• 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: I'm killing my database
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I'm killing my database


  • Subject: Re: I'm killing my database
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 25 Apr 2007 09:56:14 -0700


On Apr 24, 2007, at 10:32 PM, Guido Neitzer wrote:

On 24.04.2007, at 20:59, Chuck Hill wrote:

The first thing I would do is to add this line:
recordContext .undoManager().removeAllActions();

The next thing I would do (voodoo or not) is to periodically dispose of recordContext and create a replacement. In the past that was vital.

It still is. It helps. Not necessarily for performance but normally for memory usage. I normally do bulk import in batches of up to 500 objects per batch, then save and dispose the editingContext, set it to null and create in new one in the next batch. Also for bulk updating of EOs.


That works well for my importers.

If you need to resolve relationships during import, pre-fetching the relationships can make a huge difference.

As as you are deleting, I have a DeletePrefetcher class that may be of use. I originally wrote this as a bug workaround, but it might also make the fetches more efficient. It is part of our GVCEOFExtensions framework that you can get from http:// sourceforge.net/projects/gvcsitemaker


To save you the download, I have temporarily stuck a copy here:

http://www.gvcsitemaker.com/chill/files/deleteprefetcher.java

Chuck

--

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: 
 >I'm killing my database (From: Scott Winn <email@hidden>)
 >Re: I'm killing my database (From: Chuck Hill <email@hidden>)
 >Re: I'm killing my database (From: Guido Neitzer <email@hidden>)

  • Prev by Date: Re: Get fetched raw row into an editing context
  • Next by Date: Re: Get fetched raw row into an editing context
  • Previous by thread: Re: I'm killing my database
  • Next by thread: Re: I'm killing my database
  • Index(es):
    • Date
    • Thread