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

  • SEARCH
  • Home
  • 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 8934905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:52:52+00:00 2026-06-15T09:52:52+00:00

I have a very complex UIViewController that loads extremely slow sometimes, it can take

  • 0

I have a very complex UIViewController that loads extremely slow sometimes, it can take 4 or 5 seconds.

I do use Core Data and I have -com.apple.CoreData.SQLDebug 1 set and have ruled out that it is the loading of my data. CoreData: annotation: total fetch execution time: 0.0166s for 314 rows.

I do have this data loaded into a UITableView but was under the impression only the first visible rows get renderend so no matter how many rows I have (< 500 currently) it should not slow the display of the UIView.

I looked at instruments and checked out Time Profiler but I did not see a way to tell which method in this UIView would be slow.

Any suggestions?

UPDATE:
For me this was caused by my custom row heights, those all have to get calculated FIRST before any data in shown:
heightForRowAtIndexPath being called for all rows & how many rows in a UITableView before performance issues?

  • 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-15T09:52:53+00:00Added an answer on June 15, 2026 at 9:52 am

    I recently had a UITableViewController that was managing ~8000 rows via Core Data. The data was being managed with NSFetchedResultsController; I don’t know if you’re using NSFetchedResultsController with a NSFetchRequest but if you’re presenting a table populated via Core Data, I highly recommend it.

    That said, there’s a lot of tweaking you can do when you’re creating a NSFetchRequest to improve performance of your fetch and render, which is where I’d guess the performance bottleneck is. You can fetch batches of rows so that the initial render of your table is fast and additional fetches are performed as the user scrolls your table:

    [fetchRequest setFetchBatchSize:25];
    

    I recommend reading Apple’s guide to performance tuning and Core Data:

    https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreData/Articles/cdPerformance.html

    Since you’re using Instruments, also check out (per the above link) the Core Data cache misses, fetches, and saves. That might give you an indication of where the time is being spent.

    You might also try setting breakpoints table methods such as cellForRowAtIndexPath: to see how many rows are being rendered when the view is loaded vs. when the user scrolls the table view.

    I also set the following which seemed to improve performance in my situation:

    [fetchRequest setShouldRefreshRefetchedObjects:YES];
    [fetchRequest setReturnsObjectsAsFaults:NO];
    

    Re: faults, here’s what Apple’s NSFetchedRequest documentation says:

    The default value is YES. This setting is not used if the result type (see resultType) is NSManagedObjectIDResultType, as object IDs do not have property values. You can set returnsObjectsAsFaults to NO to gain a performance benefit if you know you will need to access the property values from the returned objects.

    Core Data can be incredibly complex. If you’re only going to use a single NSManagedObjectContext check out Erica’ Sadun’s “core data helper” from her excellent iPhone Developer’s Cookbook. If you’re going to be doing a lot with Core Data, I highly recommend MagicalRecord which can handle a lot of the heavy lifting of merging nested NSManagedObjectContexts, handling multiple threads, and more: https://github.com/magicalpanda/MagicalRecord

    Hope this helps!

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

Sidebar

Related Questions

I have a very complex graph, and there is no way that I can
I have a very complex MySQL query that includes use of the same subquery
We have a very complex Oracle package here (over 4,100 lines of code) that's
I have a rather complex data source for my UITableView. I am very carefully
Is it possible that two different views use the same controller? I have very
I have a very complex task - create a software that imports XMl files
Here is the problem: I have a very complex plugin that does lots of
I have a very complex Linq to SQL query that returns a result set
We have a very complex config file for JSF managed beans that looks like
I have a very complex issue that Me and my coworker have been discussing

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.