Re: refreshesRefetchedObjects significant hit on efficiency
Re: refreshesRefetchedObjects significant hit on efficiency
- Subject: Re: refreshesRefetchedObjects significant hit on efficiency
- From: Chuck Hill <email@hidden>
- Date: Thu, 18 Mar 2004 19:06:14 -0800
What you are seeing is what I would expect. It fetches all the data.
Then it creates new snapshots for each one. Then it sends out an
objectsChangedInObjectStore notification that is handled by each and
every editing context in the application. When all that processing is
finished then the objects are returned to you. Yes, it might check to
see if there are any differences in the snapshots but my recollection
is that it does not. That was a few years ago so memory is a little
fuzzy.
Chuck
On Mar 18, 2004, at 2:09 PM, Jonathan Rochkind wrote:
I'm working on optimizing some EOF intensive action methods lately, if
you've noticed from my list questions.
It appears to me that setting 'refreshesRefetchedObjects' to true on a
fetch spec makes the objectsWithFetchSpecification call take
_significantly_ longer to return, for a result set of even a hundred
objects or so. It's a pretty significant difference, it can easily
double the time it takes to complete that method---more if you are
also using prefetchingRelationshipKeyPaths (which makes sense).
This is to bad, as in the stuff I'm working on it would be really nice
to ensure fresh from the db values, especially when it comes to
relationships (and refreshesRefetchedObjects with prefetching
relationship keypaths is the only good way to get fresh from db values
for relationships)... but the cost is just too high for me here. It's
a part of code where I need to do multiple fetches to get a couple
hundred objects with many related objects through a bunch of
relationships, and the total amount of time is just adding up
unacceptably. If I turn of refreshesRefetchedObjects, it seems to
have a really beneficial effect.
--Jonathan
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.