glewis321
24 Oct 2011, 10:16 AM
All-
I have been experiencing I.E. memory leak problems so I created a simple test with GWT only and then included GXT libraries. I am using a timer to refresh the webpage every 1second to test this memory leak. When using the GWT only, see excerpt below, over a 48 hour period with I.E. or Firefox I found no memory heap increase at 20MB and 38MB respectively.
28844
When running the GXT code below I.E’s heap grew to >1GB in just 6 minutes whereas the Firefox process grew to only 70MB.
When using GXT are there specific memory release methods we should be using that null out variables in addition to the .removeAll() method ViewPort? See msdn article: http://msdn.microsoft.com/en-us/library/bb250448(v=vs.85).aspx
- GXT version: 2.2.5
- GWT version: 2.4.0
- Host mode/web mode/both: web mode
- Browser and version: I.E. 7/8/9
- Operating System: Windows (XP and 7)
- Sample code:
GWT
public class TestApp implements EntryPoint {
VerticalPanel centerPanel = new VerticalPanel();
Timer refreshTimer = new Timer() {
public void run() {
updateGUI();
schedule(500);
}
};
public void onModuleLoad() {
RootPanel.get().add(centerPanel);
refreshTimer.schedule(1000);
}
public void updateGUI(){
centerPanel.clear();
VerticalPanel mainPanel = new VerticalPanel();
for(int i = 0; i < 300; i++){
TextBox tb = new TextBox();
tb.setSize("250", "25");
tb.setText(new Date().toString());
mainPanel.add(tb);
}
centerPanel.add(mainPanel);
}
}
GXT
public class TestApp implements EntryPoint {
LayoutPanel centerPanel = new LayoutPanel();
Timer refreshTimer = new Timer() {
public void run() {
updateGUI();
schedule(1000);
}
};
public void onModuleLoad() {
Viewport viewport = new Viewport();
viewport.setLayout(new BorderLayout());
BorderLayoutData data = new BorderLayoutData(LayoutRegion.CENTER);
viewport.add(centerPanel, data);
RootPanel.get().add(viewport);
refreshTimer.schedule(1000);
}
private void updateGUI() {
centerPanel.clear();
VerticalPanel mainPanel = new VerticalPanel();
for (int i = 0; i < 300; i++) {
TextBox tb = new TextBox();
tb.setSize("250", "25");
tb.setText(new Date().toString());
mainPanel.add(tb);
}
centerPanel.add(mainPanel);
}
}
Thanks for your help,
Greg
I have been experiencing I.E. memory leak problems so I created a simple test with GWT only and then included GXT libraries. I am using a timer to refresh the webpage every 1second to test this memory leak. When using the GWT only, see excerpt below, over a 48 hour period with I.E. or Firefox I found no memory heap increase at 20MB and 38MB respectively.
28844
When running the GXT code below I.E’s heap grew to >1GB in just 6 minutes whereas the Firefox process grew to only 70MB.
When using GXT are there specific memory release methods we should be using that null out variables in addition to the .removeAll() method ViewPort? See msdn article: http://msdn.microsoft.com/en-us/library/bb250448(v=vs.85).aspx
- GXT version: 2.2.5
- GWT version: 2.4.0
- Host mode/web mode/both: web mode
- Browser and version: I.E. 7/8/9
- Operating System: Windows (XP and 7)
- Sample code:
GWT
public class TestApp implements EntryPoint {
VerticalPanel centerPanel = new VerticalPanel();
Timer refreshTimer = new Timer() {
public void run() {
updateGUI();
schedule(500);
}
};
public void onModuleLoad() {
RootPanel.get().add(centerPanel);
refreshTimer.schedule(1000);
}
public void updateGUI(){
centerPanel.clear();
VerticalPanel mainPanel = new VerticalPanel();
for(int i = 0; i < 300; i++){
TextBox tb = new TextBox();
tb.setSize("250", "25");
tb.setText(new Date().toString());
mainPanel.add(tb);
}
centerPanel.add(mainPanel);
}
}
GXT
public class TestApp implements EntryPoint {
LayoutPanel centerPanel = new LayoutPanel();
Timer refreshTimer = new Timer() {
public void run() {
updateGUI();
schedule(1000);
}
};
public void onModuleLoad() {
Viewport viewport = new Viewport();
viewport.setLayout(new BorderLayout());
BorderLayoutData data = new BorderLayoutData(LayoutRegion.CENTER);
viewport.add(centerPanel, data);
RootPanel.get().add(viewport);
refreshTimer.schedule(1000);
}
private void updateGUI() {
centerPanel.clear();
VerticalPanel mainPanel = new VerticalPanel();
for (int i = 0; i < 300; i++) {
TextBox tb = new TextBox();
tb.setSize("250", "25");
tb.setText(new Date().toString());
mainPanel.add(tb);
}
centerPanel.add(mainPanel);
}
}
Thanks for your help,
Greg