GWT 2.0 contains huge improvements compared to the previous 1.7 release. I think the most importants are the new development mode and the draft compilation.
2009/12/29
2009/12/23
Adding many items to a GWT ListBox - a faster approach
Adding items to a ListBox using the ListBox.addItem() method may result in performance problems on some browsers, which has been reported as issue#49.
For example, adding 10000 items in a loop takes (on my computer):
The performance of IE8 is not acceptable, it's just too slow.
Fortunatelly there is a much faster method if you need to add many items when the ListBox is created (or it is possible to recreate the ListBox when it has to be repopulated).
For example, adding 10000 items in a loop takes (on my computer):
Browser | Time |
---|---|
FireFox 3.5.6 | 205 ms |
Google Chrome 3.0.195.38 | 58 ms |
Internet Explorer 8.0.6001.18702 | 33375 ms |
The performance of IE8 is not acceptable, it's just too slow.
Fortunatelly there is a much faster method if you need to add many items when the ListBox is created (or it is possible to recreate the ListBox when it has to be repopulated).
Subscribe to:
Posts (Atom)