Hi there,
We are currently working with the latest released version (4.0) of SmartGWT and have had the following issue reported by our customers. A full decoupled test case can be found below the explanation of the issue.
Situation
When editing a value in an editable ListGrid on a ListGridField that is of ListGridFieldType.DATE, upon pressing 'ok' on the pop-up date chooser there is a significant freeze on Chrome. The length of the freeze is directly proportional to the number of records currently in the grid. This is not an issue in Internet Explorer 9 or Firefox. This issue also occurs if you are providing DateItem instances via a ListGridEditorCustomizer, so the assumption would be it is a browser specific issue with the DateItem implementation rather than with ListGrid.
Test Case
We are currently working with the latest released version (4.0) of SmartGWT and have had the following issue reported by our customers. A full decoupled test case can be found below the explanation of the issue.
Situation
When editing a value in an editable ListGrid on a ListGridField that is of ListGridFieldType.DATE, upon pressing 'ok' on the pop-up date chooser there is a significant freeze on Chrome. The length of the freeze is directly proportional to the number of records currently in the grid. This is not an issue in Internet Explorer 9 or Firefox. This issue also occurs if you are providing DateItem instances via a ListGridEditorCustomizer, so the assumption would be it is a browser specific issue with the DateItem implementation rather than with ListGrid.
Test Case
Code:
import java.util.HashSet; import com.smartgwt.client.types.ListGridFieldType; import com.smartgwt.client.widgets.form.fields.DateItem; import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.grid.ListGridField; import com.smartgwt.client.widgets.grid.ListGridRecord; /** * Demonstrating the severe performance issues involved in loading an editable grid * relying on {@link DateItem} instances to handle cell editing in Chrome. * * @author Liam * */ public class DateItemPerformance extends ListGrid { public DateItemPerformance() { super(); setSize("100%", "100%"); setCanEdit(true); initFields(); setSpoofData(); } protected void initFields() { ListGridField nameField = new ListGridField("name", "Name"); nameField.setCanEdit(false); ListGridField dateField = new ListGridField("date", "Date"); dateField.setType(ListGridFieldType.DATE); setFields(nameField, dateField); } protected void setSpoofData() { HashSet<ListGridRecord> records = new HashSet<ListGridRecord>(); for (int i = 0; i < 100; i++) { ListGridRecord testRecord = new ListGridRecord(); testRecord.setAttribute("name", "Test Record " + i); testRecord.setAttribute("date", System.currentTimeMillis()); records.add(testRecord); } setData(records.toArray(new ListGridRecord[0])); } }
Comment