• 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 control
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory control


  • Subject: Re: Memory control
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 30 Nov 2010 10:28:35 -0800

On Nov 30, 2010, at 3:29 AM, Gennady Kushnir wrote:

> Hello list.
> I've got "Out of memory" error once, when an app was under significant
> load serving multiple users.
> I am wondering if there is a way to monitor memory usage and possibly
> force garbage-collection of unused objects.
> For example, when debugging with MultiECLockManager I noticed that
> formerly used editing contexts do not get garbage collected.


John's tip should fix that (unless you are keeping strong references in the session or someplace):

> - reduce the page cache size from the default of 30. You rarely need this many backtrack pages and they consume memory


As an alternative to this:

> - eliminate or reduce the ec undo stack size.

You can call  undoManager().removeAllActions() after a successful save.   To make this even easier, I use an EC subclass with this code:

    /**
    * Overridden to clear undo stack after a successful save.
    */
    public void saveChanges()
    {
        super.saveChanges();
        if (undoManager() != null)
        {
            undoManager().removeAllActions();
        }
    }


Chuck


--
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







Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: Memory control
      • From: John Larson <email@hidden>
References: 
 >Memory control (From: Gennady Kushnir <email@hidden>)

  • Prev by Date: Re: Database Connection Question
  • Next by Date: Re: Memory control
  • Previous by thread: Re: Memory control
  • Next by thread: Re: Memory control
  • Index(es):
    • Date
    • Thread