diff --git a/src/Plugin/views/field/WeightSelector.php b/src/Plugin/views/field/WeightSelector.php
index c82ad74..d27a195 100644
--- a/src/Plugin/views/field/WeightSelector.php
+++ b/src/Plugin/views/field/WeightSelector.php
@@ -132,8 +132,29 @@ class WeightSelector extends FieldPluginBase {
   public function viewsFormSubmit(array &$form, FormStateInterface $form_state) {
     $field_name = $form_state->getValue('views_field');
     $rows = $form_state->getValue($field_name);
+    $batch = [
+      'title' => t('Saving....'),
+      'operations' => [
+        [
+          'Drupal\weight\Plugin\views\field\WeightSelector::updateEntity',
+          [$rows, $field_name]
+        ],
+      ],
+      'finished' => 'Drupal\weight\Plugin\views\field\WeightSelector::updateEntityFinishedCallback',
+    ];
+    batch_set($batch);
+  }
+
+  public function updateEntity($rows, $field_name, &$context) {
+    if (empty($context['sandbox'])) {
+      $context['sandbox']['progress'] = 0;
+      $context['sandbox']['current_id'] = 0;
+      $context['sandbox']['max'] = count($rows);
 
-    foreach ($rows as $row) {
+    }
+    $limit = 4;
+    $rows_entities = array_slice($rows, $context['sandbox']['current_id'], $limit);
+    foreach ($rows_entities as $row) {
       if ($row['langcode']) {
         $entity = $row['entity']->getTranslation($row['langcode']);
       }
@@ -144,7 +165,31 @@ class WeightSelector extends FieldPluginBase {
         $entity->set($field_name, $row['weight']);
         $entity->save();
       }
+      $context['results'][] = $entity->id();
+      $context['sandbox']['progress']++;
+      \Drupal::logger('content_id_1')->notice($context['sandbox']['progress']);
+
     }
+    $context['sandbox']['current_id'] = $context['sandbox']['progress'];
+
+    if ($context['sandbox']['progress'] != $context['sandbox']['max']) {
+      $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
+    }
+
   }
 
+  public static function updateEntityFinishedCallback($success, $results, $operations) {
+    if ($success) {
+      // Here we do something meaningful with the results.
+      $message = t('@count items successfully processed:', array('@count' => count($results)));
+      \Drupal::messenger()->addStatus($message);
+    }
+    else {
+      // An error occurred.
+      // $operations contains the operations that remained unprocessed.
+      $error_operation = reset($operations);
+      $message = t('An error occurred while processing %error_operation with arguments: @arguments', array('%error_operation' => $error_operation[0], '@arguments' => print_r($error_operation[1], TRUE)));
+      \Drupal::messenger()->addError($message);
+    }
+  }
 }
