Ext Premium Member
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.
Indeed, we can only see the memory usage of the process (i.e. iexplore.exe).
- Did our application has still some objects linked?
- Did Ext JS has not released unused objects/events?
- Is the browser actually lazy?
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).
Ext JS Premium Member
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
Tags for this Thread