• 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: Chuck Hill <email@hidden>
  • Date: Wed, 4 Mar 2009 11:39:23 -0800


On Mar 4, 2009, at 6:18 AM, Jeff Schmitz wrote:

I am actually using ERXBatchFetchUtilities.  e.g.

ERXBatchFetchUtilities.batchFetch(pool.entries(), Entry.GAME.append(Game.TEAM_POPUPS));

Is that the same thing, or something different?

Different


Is raw row fetching likely to be even faster?

Short answer: probably but you will get data not objects so your code will need to be adjusted to turn these into objects or to work directly with raw data.


Wiki....

http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-Raw+Rows
http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-EOF+Performance+Tuning
http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-Memory+Management
http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-Bulk+Operations


Chuck




On Sunday, March 01, 2009, at 09:55PM, "Lachlan Deck" <email@hidden > wrote:
On 02/03/2009, at 2:30 PM, Jeff Schmitz wrote:

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.

When you set the flag on the fetch spec to fetch raw rows the pk keys are included in the results. e.g., if your primary key is called 'id' then: rawResultRow.objectForKey("id") will get your pk value.

You can use the editing context (and EOUtilities) to turn the raw row
back into a regular eo.

Now .. you might also want to have a look at Wonder's
ERXFetchSpecificationBatchIterator.

e.g.,
ERXFetchSpecificationBatchIterator iter = new
ERXFetchSpecificationBatchIterator(someRegularFetchSpec, ec,
yourBatchSize);
while (iter.hasNext()) {
	NSArray stuff = iter.nextBatch();
	// do stuff
	ec.saveChanges();
	iter.setEditingContext(ERXEC.newEditingContext());
}

with regards,
--

Lachlan Deck





_______________________________________________
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


-- 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@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: Memory Management (From: Jeff Schmitz <email@hidden>)
 >Re: Memory Management (From: Andrew Lindesay <email@hidden>)
 >Re: Memory Management (From: Jeff Schmitz <email@hidden>)
 >Re: Memory Management (From: Lachlan Deck <email@hidden>)
 >Re: Memory Management (From: Jeff Schmitz <email@hidden>)

  • Prev by Date: Re: TOMCAT deployment + WebServerResources
  • Next by Date: WebServices question
  • Previous by thread: Re: Memory Management
  • Next by thread: Re: Memory Management
  • Index(es):
    • Date
    • Thread