Re: CellTable with AsyncDataProvider - load performance issue
1.) Can't you use SQL Limit/Offset keywords to select the range? Would probably simplify your server code a bit and your DB knows what you want to do. 2.) Some (if not all) databases should be able to log slow queries if configured. If thats not possible add some time tracking and logging code where you think it makes sense. That way you can verify if its a server issue or a network/client issue. -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/FtDrwGj1ea0J. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: CellTable with AsyncDataProvider - load performance issue
Hi! Am Freitag, 19. Oktober 2012 11:41:40 UTC+2 schrieb Ümit Seren: > > I would debug it using Chrome Developer Tools. You can check the HTTP > request and see where most of the time is spent. I guess there must be an > issue with the backend. > Do you also get the slowdowns in production mode? > >> >> I see the delays in production mode only. In debug mode I always have a nearly empty database, because it gets extremely slow otherwise. The AsyncDataProvider uses the same RPC calls to fetch the data as the simple table that I used before, except that the AsyncDataProvider never loads all records at once. It specifies a record interval with a start and end index. On the database level I realize this as follows: ResultSet r = dbs.query (...); ... if (filter.ix0 != -1) r.relative (filter.ix0 - 1); // fast forward to the first wanted record int n = filter.ix1 - filter.ix0 + 1; // number of records to load int i = 0; ... while (i++ < n) { if (!r.next ()) break; Game g = loadGame (r); l.add (g); } The only difference with AsyncDataProvider I see is that I make a jump in the result set to the index of the first wanted record (r.relative above). Maybe the database is slow at this point. But I cannot verify this. The delay occurrs not always, just sometimes... Magnus -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/oiPkOfkj6vIJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: CellTable with AsyncDataProvider - load performance issue
I would debug it using Chrome Developer Tools. You can check the HTTP request and see where most of the time is spent. I guess there must be an issue with the backend. Do you also get the slowdowns in production mode? On Wednesday, October 17, 2012 1:16:53 PM UTC+2, Magnus wrote: > > Hello, > > I changed all the simple lists of my application into CellTables with an > AsyncDataProvider. > > Before the change, I always loaded the whole list via RPC and also showed > the whole list in the GUI. > After the change, I always load a portion according to the page size and > always show one page only. > > However, it sometimes lasts very long, up to 10 sec, to fetch the data. > During this time the CellTable shows its loading animation. This does not > happen most of the time, but when it happens it looks like a problem to the > user. > > How can it be that fetching the whole list has a good constant > performance, while fetching the small portions with AsyncDataProvider is > that slow *sometimes*? > > See below how I create the AsyncDataProvider. > > Thanks > Magnus > > - > > protected void createDataProvider () > { > pvd = new AsyncDataProvider() > { >@Override >protected void onRangeChanged(HasData display) >{ > Range r = display.getVisibleRange(); > int start = r.getStart() + 1; > int end = start + r.getLength() - 1; > > onRangeChange (start,end); >} > }; > > } > > public void onRangeChange (int i0,int i1) > { > // load list and record count via RPC call > } > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/cASy2mqw1tMJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
CellTable with AsyncDataProvider - load performance issue
Hello, I changed all the simple lists of my application into CellTables with an AsyncDataProvider. Before the change, I always loaded the whole list via RPC and also showed the whole list in the GUI. After the change, I always load a portion according to the page size and always show one page only. However, it sometimes lasts very long, up to 10 sec, to fetch the data. During this time the CellTable shows its loading animation. This does not happen most of the time, but when it happens it looks like a problem to the user. How can it be that fetching the whole list has a good constant performance, while fetching the small portions with AsyncDataProvider is that slow *sometimes*? See below how I create the AsyncDataProvider. Thanks Magnus - protected void createDataProvider () { pvd = new AsyncDataProvider() { @Override protected void onRangeChanged(HasData display) { Range r = display.getVisibleRange(); int start = r.getStart() + 1; int end = start + r.getLength() - 1; onRangeChange (start,end); } }; } public void onRangeChange (int i0,int i1) { // load list and record count via RPC call } -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/YUtNDCBab4UJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.