tomalex0
30 Nov 2010, 5:42 AM
Hi,
Just need some guidance while approaching a Project Using Sencha.
Basically the App will have Many Panels and SubPanels.
For examples I have two Main Panels A and B
where A have 10 items (Panel) and B have 12 items.
While some panel layouts are shared by both A and B
so i made it as a function
var subpanFunc = function (id,title){
if(Ext.getCmp(id)){
return Ext.getCmp(id);
}
var subpan = new Ext.Panel({
id:id,
title:'title
items:[
// this may be a list with users
]
});
return subpan;
}
So if i make two calls like
var sub1,sub2;
sub1= subpanFunc('sub1','sub1');
sub2= subpanFunc('sub2','sub2');
mainpanelA.setActiveItem(sub1);
mainpanelB.setActiveItem(sub2);
I have two instance of same panel and sub1 with be item of A and sub2 that of B;
while im not accessing B , i will destroy all items of B to free the Dom.
But the variables to which i have assigned the panels will be still there.
ie sub2 will be having all the objects.
Then i will have to manualy set
sub2 = {}
So what i'm trying to ask is
will those objects make App Slow ?
Is there a better way to approach this ?
Hope someone could help me with this.
Just need some guidance while approaching a Project Using Sencha.
Basically the App will have Many Panels and SubPanels.
For examples I have two Main Panels A and B
where A have 10 items (Panel) and B have 12 items.
While some panel layouts are shared by both A and B
so i made it as a function
var subpanFunc = function (id,title){
if(Ext.getCmp(id)){
return Ext.getCmp(id);
}
var subpan = new Ext.Panel({
id:id,
title:'title
items:[
// this may be a list with users
]
});
return subpan;
}
So if i make two calls like
var sub1,sub2;
sub1= subpanFunc('sub1','sub1');
sub2= subpanFunc('sub2','sub2');
mainpanelA.setActiveItem(sub1);
mainpanelB.setActiveItem(sub2);
I have two instance of same panel and sub1 with be item of A and sub2 that of B;
while im not accessing B , i will destroy all items of B to free the Dom.
But the variables to which i have assigned the panels will be still there.
ie sub2 will be having all the objects.
Then i will have to manualy set
sub2 = {}
So what i'm trying to ask is
will those objects make App Slow ?
Is there a better way to approach this ?
Hope someone could help me with this.