• 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: undo and non-object attribute [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data: undo and non-object attribute [SOLVED]


  • Subject: Re: Core Data: undo and non-object attribute [SOLVED]
  • From: Matteo Rossi <email@hidden>
  • Date: Sun, 15 Oct 2006 21:36:20 +0200


As always with performance issues, you really should measure before deciding.


Remember, you still must call -willAccessValueForKey: and - didAccessValueForKey: before using your instance variables directly.

Just when I thought I had understood everything... If I'm not wrong, willAccessValueForKey should be used when the value could be stored in the persistent store and a fault should be fired to retrieve the correct value. Now, I have two persistent attributes xValue and yValue which are sync'ed to my ivars only in willSave and the updated values are in my ivars _point.x and _point.y. Why should I use willAccessValueForKey: and didAccessValueForKey: ? It's meaningful only for CD attributes which must be retrieved in the persistent store, I think. I've tried removing them in the accessors X and Y and everything seems to work fine.
Meanwhile I've run some tests to check real performances. The direct ivars access is definitely faster. If I can enable openGL Profiler I will post some specs.




_______________________________________________
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


  • Follow-Ups:
    • Re: Core Data: undo and non-object attribute [SOLVED]
      • From: Jakob Olesen <email@hidden>
References: 
 >Core Data: undo and non-object attribute (From: Matteo Rossi <email@hidden>)
 >Re: Core Data: undo and non-object attribute (From: Jakob Olesen <email@hidden>)
 >Re: Core Data: undo and non-object attribute (From: Matteo Rossi <email@hidden>)
 >Re: Core Data: undo and non-object attribute (From: Jakob Olesen <email@hidden>)
 >Re: Core Data: undo and non-object attribute [SOLVED] (From: Matteo Rossi <email@hidden>)
 >Re: Core Data: undo and non-object attribute [SOLVED] (From: Jakob Olesen <email@hidden>)

  • Prev by Date: Re: Localising Preference Panes
  • Next by Date: Re: NSImage Memory Management: To Page Or Not To Page.
  • Previous by thread: Re: Core Data: undo and non-object attribute [SOLVED]
  • Next by thread: Re: Core Data: undo and non-object attribute [SOLVED]
  • Index(es):
    • Date
    • Thread