PDA

View Full Version : [Solved] TabPanel memory consumption and free-up



rnieto
12 Aug 2009, 6:53 AM
I'd like to ask for help with regards to freeing up memory when using tab panels.

In the application that I'm working consists of a big tab panel, the tabs themselves are closable. When I close an open tab only around 60bytes of memory is freed (from the around 1.2MB ) even if I wait for 2 minutes. Am I missing something when it comes to cleanup of closable tab panels?

I'm not assuming that I could get back the whole 1.2MB but even 600KB would be nice. At its current state the app I'm maintaining could possibly consume upwards of 800MB during a whole day's work. (A browser refresh or redirect or about:blank is not an option for us).

Version: ExtJS 3.0
Browser/App Tested: IE6 and Sieve (The client uses and requires IE6)

*Here's a sample of what each tab is, we do something like:

tabpanel.add(new view.MainForm());



view.MainForm = Ext.extend(Ext.FormPanel, {
title : null,
state : null,
initComponent : function() {
Ext.apply(this, {
title : this.title,
labelAlign : 'top',
labelWidth : 120,
autoScroll : true,
defaults : {
width : '95%',
border: false
},
items : [{
fieldLabel : 'Title',
name : 'titleTxt',
labelSeparator : '',
xtype : 'textfield',
maxLength : 80
}, {
xtype : 'hidden',
name : 'desc'
}]
});
view.MainForm.superclass.initComponent.call(this);
}
}

I am running out of ideas and out of threads to read, I am hoping some might have alternative ideas.

[Solution]

It seems that we weren't just cleaning up the variables we declared and were using. Some of our stores and custom objects seem to be holding-up the dom clean-up. Although jgarcia is right, upon checking even the ExtJS desktop example and running it on Sieve, a lot of memory is cleaned-up afterwards although there is always some KB of memory that is never recovered (Unless you go to about:blank which is not an option for a lot of people).

Thanks.

16 Aug 2009, 8:05 AM
out of topic, but valuable none the less:

why are you applying the title again?

16 Aug 2009, 8:07 AM
Also, From my understanding memory management in IE6 is just horrendous.

can you setup a public test case?

16 Aug 2009, 8:21 AM
var ClassSuper=function(){
}
ClassSuper.prototype={
f:function(){
console.log("call super f()");
}
}




var SubClass = Ext.extend(ClassSuper,{
constructor : function() {
//To extend
SubClass.superclass.constructor.call(this);


},
f:function(){
console.info("call base f()");
SubClass.superclass.f.apply(this)
}
});

var ins = new SubClass();
ins.f();