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 647567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:44:11+00:00 2026-05-13T21:44:11+00:00

my app shows a map with annotations fetched from core data. Currently I do

  • 0

my app shows a map with annotations fetched from core data. Currently I do performFetch in viewDidLoad for the map, however, this is delaying the map from appearing immediately on the screen when I select its tab in my tabViewController. Is there a more appropriate place to call performFetch or is there something else I’m doing wrong? It’s returning approx 250 objects from Core Data.

Thanks

  • 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-05-13T21:44:11+00:00Added an answer on May 13, 2026 at 9:44 pm

    In addition-to/instead-of running threading, you could restrict your fetch to a small batch size, say 10 objects. Then fetch 10 objects, display them, then fetch the next 10 and so on. This would keep your interface live and the user would understand they were watching a progressive process.

    Use -[NSFetchRequest setFetchLimit:] to restrict the number of objects returned per fetch and -[NSFetchRequest setFetchOffset:] to index the subsequent fetches.

    From the Apple Docs on fetchOffset:

    The default value is 0.

    This setting allows you to specify an
    offset at which rows will begin being
    returned. Effectively, the request
    will skip over the specified number of
    matching entries. For example, given a
    fetch which would normally return a,
    b, c, d, specifying an offset of 1
    will return b, c, d, and an offset of
    4 will return an empty array. Offsets
    are ignored in nested requests such as
    subqueries.

    This can be used to restrict the
    working set of data. In combination
    with -fetchLimit, you can create a
    subrange of an arbitrary result set.

    You might also want to look at your Core Data object graph design. 250 objects isn’t a lot and there shouldn’t be a significant performance hit processing that many objects. You may have to much data crammed into one entity so you have to fault in a lot unneeded data to get some relatively trivial information.

    For example, a common mistake is to add an attribute with a great deal of data, such as an image, to a commonly accessed entity, such as Person entity. This causes problem because to get the Person.name attribute, you also have to load in an image of hundreds of kb.

    A better design is to park large attributes in their own entity and link to other entities as relationships. That way, the large data chunk is only faulted in when you explicitly call the relationship. In the above example, you would put the image in its own entity. That way, when you wanted Person.name, you need only fault in the lightweight text.

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

Sidebar

Related Questions

I am switching to map app from my app to show the location,can some
In my app I download kml files and show their data in the map.How
How can I download files to my trigger.io app? My app shows offline data,
Trying to call a SAP SOAP Web Service from a generated sudzc app shows
I'm working on an iPhone app that shows a map with multiple circle overlays
I have created a simple map app that shows the local garage sales in
I'm working on an app that shows a couple of places on the map
I implemented the app that displays the map. and it shows the particular location
I have an app based on a tab bar and data retrieved from the
I currently have an app that when I place an annotation on a map,

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.