1. #1
    Ext Premium Member Jan (HL)'s Avatar
    Join Date
    Aug 2010
    Location
    Germany
    Posts
    111
    Vote Rating
    9
    Jan (HL) will become famous soon enough

      0  

    Lightbulb Discussion: Memory Consumption, GC, Deallocation

    Discussion: Memory Consumption, GC, Deallocation


    After upgrading from Ext JS 3 up to 4.1, we have noticed some considerable additional memory consumption in some browsers. Unfortunately this affects IE (up to IE9) which does not provide any help to determine the problem exactly regarding memory usage. If it is a memory leak: in which part of the system?

    I'm well aware that Ext JS 4 may be use more memory than Ext JS 3. That's okay is should not be a topic.
    1. Did our application has still some objects linked?
    2. Did Ext JS has not released unused objects/events?
    3. Is the browser' JavaScript GC too lazy?
    4. Is the browser actually lazy?
    Indeed, we can only see the memory usage of the process (i.e. iexplore.exe).

    This will be complicated by the fact that in other browsers (like Chrome) with more detailed analyze tools the consumption will also rise but with significant lesser additions.
    Some special actions in a certain part of the application rise the memory usage (which is a high indication for a memory leak), I/we need some key figures or other informations which could provide hints where the memory is actually used.

    My first starting point was the global number of components (Ext.ComponentManager.getCount()). But in our case, this does not help because before and after the actions (Open, Close) the number is the same (as expected) but not the memory usage.

    Unlike others, I have no typical IE/layout issues (any more).. well, at least not with the performing of the actual rendering.

    I want to start this discussion to collect some ideas how to determine this kind of situations.
    Do you have ideas? Additional comments? Hints?

    (To give a brief overview of the complexity of the application: a number of 250 components is the lower end, and we have about 400 custom components registered. I don't want save 1 MB of memory, but 100 MB or more).

  2. #2
    Ext JS Premium Member
    Join Date
    Jan 2008
    Location
    Germany, Berlin
    Posts
    135
    Vote Rating
    11
    fschaeffer will become famous soon enough

      0  

    Default


    I think this will be a complex task to solve.

    You'll have to look for closures, double check all components to provide destructor-methods, avoid calling .on but rather use .mon and so on ...

    Examine the DOM and check, whether some object remain where they shouldn't ...

    And maybe use sIEve to check for memory leaks - have a look at this article
    http://blogs.msdn.com/b/ie/archive/2007/11/29/tools-for-detecting-memory-leaks.aspx

    H
    TH
    Florian

Thread Participants: 1

Tags for this Thread