PDA

View Full Version : Grid Memory Usage increase but never gets release



teamblack
17 Mar 2011, 7:34 AM
- Detailed description of the problem:

I've created a simple grid and each time i hover on the grid (header, row, blank space) or resize the column width for example, it increase the memory usage (tracked with Chrome Task Manager) of the application in the browser. This is problematic for us since some of our grids are auto-refreshed each 5 minutes. The memory of the page increase and never gets release.

- GXT version: 2.2.1
- GWT version: 2.0.4
- Host mode/web mode/both: Both
- Browser and version: Google Chrome 10.0.648.134
- Operating System: Windows (XP and 7), Kubuntu 10.10, OSX
- Sample code:


public class Test implements EntryPoint {

public void onModuleLoad() {

Viewport viewport = new Viewport();
viewport.setLayout(new BorderLayout());

ModelData model1 = new BaseModelData();
model1.set("id", "1");
model1.set("name", "test #1");
ModelData model2 = new BaseModelData();
model2.set("id", "2");
model2.set("name", "test #2");
List<ModelData> gridModelData = new ArrayList<ModelData>();
gridModelData.add(model1);
gridModelData.add(model2);

ListStore<ModelData> store = new ListStore<ModelData>();
store.add(gridModelData);

List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
ColumnConfig columnConfig1 = new ColumnConfig("id", "ID", 100);
columnConfig1.setResizable(true);
columns.add(columnConfig1);
ColumnConfig columnConfig2 = new ColumnConfig("name", "NAME", 100);
columnConfig2.setResizable(true);
columns.add(columnConfig2);

Grid<ModelData> grid = new Grid<ModelData>(store, new ColumnModel(columns));
viewport.add(grid, new BorderLayoutData(LayoutRegion.NORTH, 100));
RootPanel.get().add(viewport);
}
}

tanchi
24 Jun 2011, 9:10 AM
Hi, did you get any insights into the Grid memory usage?

I also ran into memory issues with GXT Grid. In my case, I have a GXT Grid with 5 columns. The server side returns an XML file of 160KB, but after it's processed and put in the Grid table, the Task Manager in Windows showed that the browser memory (tested both on IE8 and FF 3.6) increased by a whopping 30 ~ 40MB.

Has anyone else seen this issue?

gishmo
27 Jun 2011, 12:28 AM
Just played a little bit with my app which uses a lot of Grids. I can see increasing of memory usage when loading a Grid. Memory usage increases also, when loading the Grid again.

After a few seconds I can see that the memory usage returns to the value after the first load of the Grid.

I did the test with FF5 & Google Chrome.

OS X 10.6.8, GWT 2.3.0, GXT 2.2.4