• 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: [CD] programmatically inserting MO in MOC gets slower with number of items II
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [CD] programmatically inserting MO in MOC gets slower with number of items II


  • Subject: Re: [CD] programmatically inserting MO in MOC gets slower with number of items II
  • From: Volker Runkel <email@hidden>
  • Date: Fri, 22 Sep 2006 10:27:52 +0200

Hi,

thanks for the answer. Before even thinking about performance I first evaluated memory allocations with ObjectAlloc. That looks rather good, I do not have any memory problems, allocations do take only place for the objects that remain in the MOC.

Instead of Shark I used Sampler, but I did not find anything helpful. The NSArrayController is set to automatically prepareContents, but disabling that did not help. As soon as I do not set the relation everything is really fast. My guess at the moment is that my "parent" object NSMutableSet, which holds the one-to-many relationship internally is causing the problem, but until now I did not find anything. I am not very used to Sampler or Shark and therefore always need some runs to get a grip of what they tell me.

Another thing I will try is to create the objects in a second MOC which I merge when all MOs are created. Maybe a single merge of two MOC is faster.

I broke down the code to the smallest possible number of lines, and it just enumerates through an existing NSArray and sets two values (relationship and filename entry) for each new MO.


Thanks again, Volker

Do you have a tight loop with an accumulation of autoreleased objects
causing memory exhaustion?  Does the Performance section in the
CoreData Programming Guide help you at all?

What do the profiling tools like Shark and ObjectAlloc tell you?

Showing your code often helps, as well.

As djb says, "Profile. Don't speculate."

J.

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >[CD] programmatically inserting MO in MOC gets slower with number of items (From: Volker Runkel <email@hidden>)
 >Re: [CD] programmatically inserting MO in MOC gets slower with number of items II (From: Volker Runkel <email@hidden>)
 >Re: [CD] programmatically inserting MO in MOC gets slower with number of items II (From: "Jordan Krushen" <email@hidden>)

  • Prev by Date: Cover flow view in Itunes 7.
  • Next by Date: Re: Cover flow view in Itunes 7.
  • Previous by thread: Re: [CD] programmatically inserting MO in MOC gets slower with number of items II
  • Next by thread: Re: [CD] slow insertion with relationship ... SOLVED
  • Index(es):
    • Date
    • Thread