views:

67

answers:

3

Hi,
I have a gwt list grid which i need to show more than 1000 messages. But it takes 40millsec to display each message. So it is very slow. Can u help me so that i can show all messages in less time.
Thanks Nagaraju

A: 

1000 items for a web-based application is too much. Try implementing some sort of paging algorithm. You could look at the PagingScrollTable from gwt incubator ;)

Bogdan
Igor Klimer
+2  A: 

As Bogdan said paging is your best bet.

However if your requirement strictly needs you to have the 1000+ lines at one time I would reconsider the grid approach.

When you are working with such a large amount of elements an iterative dom "touch" will be dirt slow.

See if you can rather create a component that gets the messages into String form with their markup. Then set the inner HTML once. You can then use something like jquery or gwtquery to attach handlers to the elements in a timely fashion.

Failing that you could use a lazy render method where you render only whats on-screen but that gets much more complicated.

G. Davids
A: 

Thank you both Bogdan and Davids for your responses. We will try both of the suggestions and compare the performance.

Kisor