• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Memory Management
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Memory Management (From: Jeff Schmitz <email@hidden>)

  • Prev by Date: Eclipse not finding Wonder frameworks
  • Next by Date: Re: Eclipse not finding Wonder frameworks
  • Previous by thread: Re: Memory Management
  • Next by thread: EOF, MySQL and DELETE CASCADE
  • Index(es):
    • Date
    • Thread