On Aug 13, 2008, at 6:42 PM, Dov Rosenberg wrote:

Our code uses EOUtilities.LocalInstanceOfObject() on occasion. Lately I have been seeing some strange slowdowns and the areas the tend to show up in the thread dumps usually have this call near them.

The objects that we are getting a localInstance of also have relationships that get accessed. Does the localInstance of an object also get a localinstance of the relationship objects?

No, the related objects are faults that need to be fired.


Is there a performance hit for using this mechanism?

No, it just returns a fault based on the EOGlobalID. Very fast and light.



We have fixed other similar issues by just refetching the objects into a new EditingContext instead of using localInstance.

I would expect that to be far, far slower.


Does LocalInstance scale under load properly?

There is nothing to scale.

Log the SQL and check that. You might be localInstancing into an EC that is set to require new data. This can result in an lot of single object trips to the database. But that is a data freshness issue, not a localInstance concern.

Chuck


--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to