Re: Memory Management
Re: Memory Management
- Subject: Re: Memory Management
- From: Jeff Schmitz <email@hidden>
- Date: Sun, 01 Mar 2009 21:30:42 -0600
Hi Andrew,
Yes, I saw your post. However, I'm not an advanced EOF user, nor
do I know SQL very well (it's one of the reason I like webobjects).
That and the fact that any change I make needs to be working in a
couple of weeks makes me want to save a change like you suggest for
later when I've got more time to come up to speed and to test. Maybe
it's not as hard as it sounds? Keep in mind that right now when you
say "Load the list of EO's into memory to be processed as raw-rows
with the PK in the raw rows." I have NO idea what you're talking about.
Thanks,
Jeff
On Mar 1, 2009, at 9:14 PM, Andrew Lindesay wrote:
Hello Jeff;
I posted on this as well? Did you get this post and have you tried
it?
Load the list of EO's into memory to be processed as raw-rows with
the PK in the raw rows. Break that lists up into batches of, for
example, 100 items. For each bunch of 100, create a new EC, lock it
and then fetch those EO's into memory and use pre-fetching to
optimise the database activity. Undertake your algorithm on the
EO's and then unlock the EC and move onto the next block of 100.
A big part of slowing-down with saturated object stores is that as
there are more and more EO's in memory it takes longer and longer
for fetches to be processed because as the system ensures
uniqueness, it will have to keep checking to see if it already has
each new row of data in memory already.
cheers.
Then I think there must be a LOT of references that build up. When
I changed my code to reset the ec periodically (after each pool
processed) it made a HUGE difference. Before that, my development
machine would eventually come to a grinding halt. After the change
it ran through everything with no noticeable slowdown. e.g.
...
Would unlock and dispose and creating a new EC in each loop be
better than ec.reset()?
___
Andrew Lindesay
www.lindesay.co.nz
_______________________________________________
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