Re: Memory Management
Re: Memory Management
- Subject: Re: Memory Management
- From: Andrew Lindesay <email@hidden>
- Date: Wed, 25 Feb 2009 09:20:43 +1300
Hello Jeff;
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.
cheers.
In my app I frequently need to run operations that read in nearly
all the data in my database. One I run in the foreground (I have
concurrent request handling on), and another I run in the background
with its own EOObjectStoreCoordinator. If I understand how things
work (and there's no guarantee of that), that would mean I basically
have 4 copies of my database in memory at once (2 ECs and to object
stores). As I use the data in a serial fashion, I was wondering if
there's a way to release the EOs that are held in memory in both the
EC and the Object Store once I know my each process is through with
them, especially for the threaded process that has its own object
store? Is just using ec.reset() at key points the way to go for the
ec's? What about for the object stores?
___
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