• 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: EOF related objects present a lot in the heap
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOF related objects present a lot in the heap


  • Subject: Re: EOF related objects present a lot in the heap
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 26 Apr 2013 10:12:32 -0700

Are you using the session's default editing context exclusively?  For memory usage optimization it is best to treat that as a read only editing context and just use it for session spanning objects (like the current user, their roles and permissions).  Then on each page, or in each stream of activity, create, lock, use, unlock, and dispose of a new editing context.  I covered this in at least one of my WOWODC presentations.

You can also make an EC subclass and clear the undo stack after a successful save:
    public void saveChanges()
    {
        super.saveChanges();
        if (undoManager() != null)
        {
            undoManager().removeAllActions();
        }
    }

Though that is less useful if you are only keeping the EC alive for one save cycle.

Chuck


On 2013-04-26, at 4:55 AM, Joseph Pachod wrote:

> Hi
>
> When looking at some memory dumps, I see huge numbers of EOF related instances, such as, by decreasing order and with % of instance nb and % of heap size :
> - _EOHandlerWeakRef 5,8% - 5,1%,
> - EOAccessArrayFaultHandler 5,7% - 6,6%
> - _EOCheapCopyMutableArray 2,9% - 1%
> - _EOMutableKnownKeyDictionnary 2,1% - 3;3%
> - _EOWeakReference 1,2% - 1%
>
> The overall JVM is about 360Mo. Each session of the application looks like holding quite some of them (they're nicely garbage collected on session termination). So they look like editing context related.
>
> I was wondering it there were some tricks to clean up these objects.
>
> For example can the WeakReference be clean up somehow ? Can the editing context cache be cleaned up to retain only the dirty objects ? Or maybe to remove some of the least used entities (or not used for quite some time) ?
>
> Any hint welcomed :)
>
> Thanks in advance
> best
>
> _______________________________________________
> 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
Executive Managing Partner, VP Development and Technical Services

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/gvc/practical_webobjects

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C!
Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!












 _______________________________________________
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: EOF related objects present a lot in the heap
      • From: Joseph Pachod <email@hidden>
    • Re: EOF related objects present a lot in the heap
      • From: Henrique Prange <email@hidden>
References: 
 >EOF related objects present a lot in the heap (From: Joseph Pachod <email@hidden>)

  • Prev by Date: Re: anyone want to test an update to golipse?
  • Next by Date: Re: EOF related objects present a lot in the heap
  • Previous by thread: EOF related objects present a lot in the heap
  • Next by thread: Re: EOF related objects present a lot in the heap
  • Index(es):
    • Date
    • Thread