• 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: CoreData/NSManagedObject accessor performance problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData/NSManagedObject accessor performance problems


  • Subject: Re: CoreData/NSManagedObject accessor performance problems
  • From: mmalc crawford <email@hidden>
  • Date: Sun, 17 Dec 2006 15:49:34 -0800


On Dec 17, 2006, at 3:17 PM, Andrew Bush wrote:
ok, so I got the filterPredicate working. yay :) unfortunately it appears t be about comparable with the other filtering methods in terms of speed...presumably it is doing much the same thing.

Please post some code.
It is unlikely that a simple predicate filter operation on a simple numeric value would cause the sort of effect you're describing.



it appears that sqlite is only storing the data values, so one of the things that is happening here is for every comparison I am creating a NSNumber out of a double (stored in sqlite), and then comparing its doubleValue with the double I am filtering it on.
and the creation of the NSNumber is apparently where the speed hit is coming from....



Earlier:

so, on the wild, random guess that the slowdown is probably caused by some kind of serialisation being reversed for each initial call to each value of each object

Wild random guessing is not helpful: measure using Shark.

If all the managed objects in your array have already been fetched, and if you're using a simple predicate filter in an array controller, then Core Data per se is not imposing any additional overhead. You should be looking elsewhere for the cause.



so..is there some (any) way for me to just get at the raw value without bothering with the NSNumber stuff? presumably NSManagedObject stores that somewhere......how can I access it directly?

You can't. Doing so would subvert part of the raison d'etre of Core Data, and whatever you might do is very unlikely to be more efficient than what Core Data itself does anyway.

mmalc

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >CoreData/NSManagedObject accessor performance problems (From: Andrew Bush <email@hidden>)
 >Re: CoreData/NSManagedObject accessor performance problems (From: Andrew Bush <email@hidden>)
 >Re: CoreData/NSManagedObject accessor performance problems (From: Scott Stevenson <email@hidden>)
 >Re: CoreData/NSManagedObject accessor performance problems (From: Andrew Bush <email@hidden>)
 >Re: CoreData/NSManagedObject accessor performance problems (From: Andrew Bush <email@hidden>)

  • Prev by Date: NSMatrix, NSImageCell and selection indicator
  • Next by Date: Re: Objects not being added to array
  • Previous by thread: Re: CoreData/NSManagedObject accessor performance problems
  • Next by thread: Re: CoreData/NSManagedObject accessor performance problems
  • Index(es):
    • Date
    • Thread