Re: Which way is more efficient to get particular EOEnterpriseObject
Re: Which way is more efficient to get particular EOEnterpriseObject
- Subject: Re: Which way is more efficient to get particular EOEnterpriseObject
- From: James Cicenia <email@hidden>
- Date: Thu, 16 Aug 2007 07:17:18 -0500
When I first started with WebObjects I was very worried about all the
overhead
of creating EOs, etc.
Well like some said here,, build it the easy way using WO and see if
you really
need to optimize. I use filtered arrays on relationships all the time
and it works
really well. I easily have over 100 related objects though not 1000s.
WebObjects has been an excellent performer and has scaled very
linearly for us
too. So, build it using WO as easy as possible and then really see if
you need
to optimize.
James
On Aug 15, 2007, at 6:25 PM, Gennady Kushnir wrote:
Hello, List
It is not an unresolvable problem. However I just want to perform
tasks in
the most efficient way.
I have a to-many relationship, which points to rather large (about
100)
heap of objects.
I need to get one of these objects - which one depends on some other
attributes of one (or get null if there isn't one that match).
And I have to take them that way one by one and possibly do that
with all
of them.
This is done while placing info from these objects to the appropriate
place on page.
In fact I have something like multidimensional (3) array of objects.
The question is - which method for performing that task is the most
efficient in WebObject framework?
Ideas I have so far:
- cycle through array (which I get from relationship attribute),
checking
if attributes match
- construct EOQualifier and filter the array with it
- just fetch required object regarding mentioned relationship as
just one
of attributes involved
- index that array converting it into actual multi-dimensional as
mentioned above (using pure Java multidimensional arrays or nesting
NSArrays/NSDictionaries)
Sorting wil not do as the order in which objects will be needed is
uneasy
to predict
Also this is not immutable and other objects into the array may
appear -
so I want to have them on their place immediately.
Regards,
Gennady
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40jimijon.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden