Issue Title:
Severe Performance Degradation after Upgrading to 3.0 on a ListGrid with a Large Set of Fields
Issue Details:
After upgrading from Smart GWT 2.5 to 3.0, the data setting process in the the below standalone test case changes from a few seconds to more than a minute for all three major browsers.
My Test Environments:
GWT 2.3.0
Smart GWT 3.0p (http://www.smartclient.com/builds/SmartGWT/3.0p/LGPL/2012-01-16)
Smart GWT 2.5 (http://code.google.com/p/smartgwt/downloads/detail?name=smartgwt-2.5.zip&can=2&q=)
Test against compiled javascript files on the following browsers
- Windows Internet Explorer 9.0.8112.16421, Update Versions 9.0.4
- Firefox 8.0
- Google Chrome 16.0.912.75 m
Windows 7 Ultimate Service Pack 1
Standalone Test Case - click the button above the grid to populate data:
Severe Performance Degradation after Upgrading to 3.0 on a ListGrid with a Large Set of Fields
Issue Details:
After upgrading from Smart GWT 2.5 to 3.0, the data setting process in the the below standalone test case changes from a few seconds to more than a minute for all three major browsers.
My Test Environments:
GWT 2.3.0
Smart GWT 3.0p (http://www.smartclient.com/builds/SmartGWT/3.0p/LGPL/2012-01-16)
Smart GWT 2.5 (http://code.google.com/p/smartgwt/downloads/detail?name=smartgwt-2.5.zip&can=2&q=)
Test against compiled javascript files on the following browsers
- Windows Internet Explorer 9.0.8112.16421, Update Versions 9.0.4
- Firefox 8.0
- Google Chrome 16.0.912.75 m
Windows 7 Ultimate Service Pack 1
Standalone Test Case - click the button above the grid to populate data:
Code:
import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.data.Record;
import com.smartgwt.client.types.AutoFitWidthApproach;
import com.smartgwt.client.widgets.Button;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.layout.VLayout;
public class ListGridTester implements EntryPoint {
public final static int COLUMN_COUNT = 100;
public final static int ROW_COUNT = 10;
ListGrid listGrid;
@Override
public void onModuleLoad() {
VLayout layout = new VLayout();
layout.setHeight100();
layout.setWidth100();
// Create a list grid with COLUMN_COUNT columns
listGrid = new ListGrid();
listGrid.setWidth100();
listGrid.setHeight100();
listGrid.setAutoFitWidthApproach(AutoFitWidthApproach.BOTH);
listGrid.setAutoFitFieldWidths(true);
ListGridField[] listGridFieldArray = new ListGridField[COLUMN_COUNT];
for (int i=0; i<COLUMN_COUNT; i++) {
listGridFieldArray[i] = new ListGridField("COLUMN_"+i);
}
listGrid.setFields(listGridFieldArray);
// A button to start populating data into the grid
Button button = new Button("Populate " + COLUMN_COUNT + " columns");
button.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Record[] recordArray = new Record[ROW_COUNT];
for (int i=0; i<ROW_COUNT; i++) {
Record record = new Record();
for (int j=0; j<COLUMN_COUNT; j++) {
record.setAttribute("COLUMN_"+j, "r:"+i+", c:"+j);
}
recordArray[i] = record;
}
listGrid.setData(recordArray);
}
});
layout.addMember(button);
layout.addMember(listGrid);
layout.draw();
}
}
Comment