Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9246359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:28:08+00:00 2026-06-18T09:28:08+00:00

I am using a NSFetchResultsController to display 100,000 + records in a UITableView. This

  • 0

I am using a NSFetchResultsController to display 100,000 + records in a UITableView. This works but it is SLOW, especially on an iPad 1. It can take 7 seconds to load which is torture for my users.

I’d also like to be able to use sections but this adds at least another 3 seconds onto the laod time.

Here is my NSFetchResultsController:

- (NSFetchedResultsController *)fetchedResultsController {

    if (self.clientsController != nil) {
        return self.clientsController;
    }

    NSFetchRequest *request = [[NSFetchRequest alloc] init];
    NSEntityDescription *entity = [NSEntityDescription entityForName:@"Client" inManagedObjectContext:self.managedObjectContext];
    [request setEntity:entity];
    [request setPredicate:[NSPredicate predicateWithFormat:@"ManufacturerID==%@", self.manufacturerID]];
    [request setFetchBatchSize:25];

    NSSortDescriptor *sort = [[NSSortDescriptor alloc]  initWithKey:@"UDF1" ascending:YES];
    NSSortDescriptor  *sort2= [[NSSortDescriptor alloc] initWithKey:@"Name" ascending:YES];
    [request setSortDescriptors:[NSArray arrayWithObjects:sort, sort2,nil]];

    NSArray *propertiesToFetch = [[NSArray alloc] initWithObjects:@"Name", @"ManufacturerID",@"CustomerNumber",@"City", @"StateProvince",@"PostalCode",@"UDF1",@"UDF2", nil];
    [request setPropertiesToFetch:propertiesToFetch];

    self.clientsController =
    [[NSFetchedResultsController alloc] initWithFetchRequest:request
                                        managedObjectContext:self.managedObjectContext sectionNameKeyPath:nil
                                                   cacheName:nil];

    return self.clientsController;

}

I have an index on ManufacturerID which is used in my NSPredicate. This seems like a pretty basic NSFetchRequest – anything I can do to speed this up? Or have I just hit a limitation? I must be missing something.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:28:09+00:00Added an answer on June 18, 2026 at 9:28 am

    First: you can use the NSFetchedResultsController‘s cache to speed up display after the first fetch. This should quickly go down to a fraction of a second.

    Second: you can try to display the only the first screenful and then fetch the rest in the background. I do this in the following way:

    • When the view appears, check if you have the first page cache.
    • If not, I fetch the first page. You can accomplish this by setting the fetch request’s fetchLimit.
      • In case you are using sections, do two quick fetches to determine the first section headers and records.
    • Populate a second fetched results controller with your long fetch in a background thread.
      • You can either create a child context and use performBlock: or
      • use dispatch_async().
    • Assign the second FRC to the table view and call reloadData.

    This worked quite well in one of my recent projects with > 200K records.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
I'm using NSFetchedResultsController (NSFRC) to display information in a UITableView . I'm trying to
I'm using NSFetchedResultsController to retrieve data for a UITableView . but problem is I
Using CI for the first time and i'm smashing my head with this seemingly
Using Location.getBearing(); I seem to get randomly changing bearings. Aka, I can turn the
Using import datetime in python, is it possible to take a formatted time/date string
I'm using an NSFetchedResultsController and NSFetchedResultsControllerDelegate to drive a UITableViewController/UITableView. A button click triggers
I have a model that looks like this: and want to display it in
I am using Core Data extensively in one of my apps. Usually, for UITableView,
I'm trying to setup a UITableView for displaying nested threaded items. I'm using Core

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.