Re: Core Data: undo and non-object attribute [SOLVED]
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