• 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: Core Data performance advice... creating relationships.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data performance advice... creating relationships.


  • Subject: Re: Core Data performance advice... creating relationships.
  • From: Martin Linklater <email@hidden>
  • Date: Mon, 14 Jan 2008 23:10:25 +0000

Using 'Instruments' my CPU usage breaks down pretty much like this:

60% NSManagedObject setValue: forKey:
20% NSManagedObjectContext executeFetchRequest:
16% NSManagedObjectContext save:
4% (misc)

So it is setting the relationships themselves which seems to take most of the time.

On 14 Jan 2008, at 22:18, Martin Linklater wrote:

I am using GC, yes. I'll take a look at the docs about short-lived objects.

I've run my code through 'Instruments' and I'm not sure what to make of the results. I'm seeing all my fetch requests but it's not telling me what is taking the time. I need to work with it more and see what I can find.

Thanks.

On 14 Jan 2008, at 22:12, I. Savant wrote:

If I understand your post correctly

You know what? Scratch that. It's clear I didn't understand. :-D ...
and I had *just* sent that message to Erik about having the guts to be
wrong. ;-) I'm just leaving work, too, so I can't even blame alcohol
yet. (sigh)


Scott's shark (or Instruments) suggestion is a good one. In addition
to his "how often are you saving" question:

- Are you using garbage collection? (see its notes about creating a
bunch of short-lived objects at once)
- If you're not using garbage collection, are you at least creating
an autorelease pool and draining it every thousand objects or so?
(there was a recent post on this list regarding that very approach
with Core Data)

Hopefully this post is more helpful than my last. ;-)

--
I.S.

_______________________________________________

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

_______________________________________________

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


  • Follow-Ups:
    • Re: Core Data performance advice... creating relationships.
      • From: email@hidden
References: 
 >Core Data performance advice... creating relationships. (From: Martin Linklater <email@hidden>)
 >Re: Core Data performance advice... creating relationships. (From: "I. Savant" <email@hidden>)
 >Re: Core Data performance advice... creating relationships. (From: "I. Savant" <email@hidden>)
 >Re: Core Data performance advice... creating relationships. (From: Martin Linklater <email@hidden>)

  • Prev by Date: [SOLVED] Re: Disabling NSTableView's behavior of turning black text white
  • Next by Date: Re: [SOLVED] Re: Disabling NSTableView's behavior of turning black text white
  • Previous by thread: Re: Core Data performance advice... creating relationships.
  • Next by thread: Re: Core Data performance advice... creating relationships.
  • Index(es):
    • Date
    • Thread