Did you try using an IncrementalCommand to break up the process of
adding rows?

On Jan 6, 7:49 pm, 郑翼羽 <[email protected]> wrote:
> Hi, I need to construct a table likegridwith massive data, for
> example 100 * 60.
>
> The code I used is dataGrid.setText(i, j, value), so I need to call it
> 6000 times, and the value varied from null data to strings with
> unfixed length.
>
> It took nearly 4 seconds to displaygrid, regardless of the data transfer time.
>
>                                 Date d3 = new Date();
>                                 for (int i = 0; i < result.length; i++) {
>                                         String[] rowValues = result[i];       
>                          
>                                         for (int j = 0; j <rowValues.length; 
> j++) {
>                                                 String value = rowValues[j];
>                                                 if (value != null) {
>                                                         dataGrid.setText(i, 
> j, value);
>                                                 }
>                                         }
>                                 }
>
>                                 d2 = new Date();
>                                 l.setText((d2.getTime() - d1.getTime()) / 
> 1000.0 + "_" +
> (d2.getTime() - d3.getTime()) / 1000.0 + "");
>
> Is there any other method to speed up these action such as add a row
> in one time?
>
> Anyone could help me, or point out whether my codes have some problems?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to