• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Long load time of managed object context
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Long load time of managed object context


  • Subject: Re: Long load time of managed object context
  • From: Matt Neuburg <email@hidden>
  • Date: Sat, 24 Jan 2009 10:20:54 -0800
  • Thread-topic: Long load time of managed object context

> Date: Fri, 16 Jan 2009 13:03:24 +0100
> From: Matteo Manferdini <email@hidden>
> Subject: Long load time of managed object context
>
> I'm testing performance in my application, to see how it behaves with
> a big load of data inside of it. My application is core data based and
> uses array controllers in entity mode to fetch data.
>
> What I discovered is that my app fetched all the managed objects
> present in core data, so I set the fetch predicate of array
> controllers at startup. This reduced dramatically the number of
> objects fetched. The problem though is that my app still takes a lot
> of time to start when is full of data.
>
> I ran the app within instruments, and the core data fetches instrument
> confirms that this is not the problem (my app fetches only 20-30
> objects when starts). But running it under Shark I can see that for
> 4-5 seconds after startup the only call on the stack is to the app
> managed object context. So I think it has something to do with
> interaction between managed object context and data stored, even if I
> don't fetch all the data. If I empty the app or leave little data
> inside of it, it starts very quickly.
>
> Does somebody know why this happens? Am I missing something obvious?
> Why does it take so much to the managed object context to load if I
> only fetch few objects? I always read that core data scales well and
> the programming guide states that 10.000 objects are not much for core
> data, but in my app it makes a big difference, so I'm wondering where
> I am wrong.

You don't say what format you're using, but if you're using XML, the entire
XML file has to be loaded and parsed, even before you fetch any objects. m.

--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, http://tinyurl.com/2ouo3b
Take Control of Customizing Leopard, http://tinyurl.com/2t9629
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Forcing allocation of a subclass
  • Next by Date: Re: Knowing when a NSArrayController is ready
  • Previous by thread: Re: Long load time of managed object context
  • Next by thread: Smart Folders and NSOpenPanel
  • Index(es):
    • Date
    • Thread