Index: plugins/FeedsUserProcessor.inc
===================================================================
--- plugins/FeedsUserProcessor.inc	(revision 1931)
+++ plugins/FeedsUserProcessor.inc	(working copy)
@@ -5,6 +5,9 @@
  * FeedsUserProcessor class.
  */
 
+// Create or delete FEEDS_NODE_BATCH_SIZE at a time.
+define('FEEDS_NODE_BATCH_SIZE', 50);
+
 /**
  * Feeds processor plugin. Create users from feed items.
  */
@@ -15,8 +18,11 @@ class FeedsUserProcessor extends FeedsPr
    */
   public function process(FeedsImportBatch $batch, FeedsSource $source) {
 
-    // Count number of created and updated nodes.
-    $created  = $updated = $failed = 0;
+    // Keep track of processed items in this pass, set total number of items.
+    $processed = 0;
+    if (!$batch->getTotal(FEEDS_PROCESSING)) {
+      $batch->setTotal(FEEDS_PROCESSING, count($batch->items));
+    }
 
     while ($item = $batch->shiftItem()) {
 
@@ -27,7 +33,7 @@ class FeedsUserProcessor extends FeedsPr
 
         // Check if user name and mail are set, otherwise continue.
         if (empty($account->name) || empty($account->mail) || !valid_email_address($account->mail)) {
-          $failed++;
+          $processed++;
           continue;
         }
 
@@ -50,35 +56,31 @@ class FeedsUserProcessor extends FeedsPr
         }
 
         if ($uid) {
-          $updated++;
+          $batch->updated++;
         }
         else {
-          $created++;
+          $batch->created++;
         }
       }
+
+      $processed++;
+      if ($processed >= variable_get('feeds_node_batch_size', FEEDS_NODE_BATCH_SIZE)) {
+        $batch->setProgress(FEEDS_PROCESSING, $batch->created + $batch->updated);
+        return;
+      }
     }
 
     // Set messages.
-    if ($failed) {
-      drupal_set_message(
-        format_plural(
-          $failed,
-          'There was @number user that could not be imported because either their name or their email was empty or not valid. Check import data and mapping settings on User processor.',
-          'There were @number users that could not be imported because either their name or their email was empty or not valid. Check import data and mapping settings on User processor.',
-          array('@number' => $failed)
-        ),
-        'error'
-      );
-    }
-    if ($created) {
-      drupal_set_message(format_plural($created, 'Created @number user.', 'Created @number users.', array('@number' => $created)));
+    if ($batch->created) {
+      drupal_set_message(format_plural($batch->created, 'Created @number user.', 'Created @number users.', array('@number' => $batch->created)));
     }
-    elseif ($updated) {
-      drupal_set_message(format_plural($updated, 'Updated @number user.', 'Updated @number users.', array('@number' => $updated)));
+    if ($batch->updated) {
+      drupal_set_message(format_plural($batch->updated, 'Updated @number user.', 'Updated @number users.', array('@number' => $batch->updated)));
     }
-    else {
+    if (!$batch->created && !$batch->updated) {
       drupal_set_message(t('There are no new users.'));
     }
+    $batch->setProgress(FEEDS_PROCESSING, FEEDS_BATCH_COMPLETE);
   }
 
   /**
