> >  Firing _loadRowCount() multiplen times may not be an issue in my 
> case, but
> >  the delay caused by filling up empty table for large number of 
> > rows (say
> >  10000 rows) is showing a blank screen for a long time.
> 
> This is a known problem that requires reworking the way requests for
> row data are issued by Table.  Currently, IIRC, the remote table 
> model isn't notified of a pending need for data until the need is 
> immediate (or nearly so).  The calls to the backend are thus made at
> the time that the table needs refreshing.  That's too late.  There
> are already hooks to allow pre-fetching data, but they're called at
> just about the same time as the need for that data so it's not
> really pre-fetched.

I don't think that is the problem here.

There is a bug in that _loadRowCount is called from two places - once
from reloadData, where everything is set up properly to start again with
new data; and also from getRowCount. In the latter case nothing proper is
done for clearing old requests and so on.

In our case getRowCount is called from the constructor of the table via
_updateStatusBar, as we had set status bar visibility to false *after*
the constructor for the table. (The easy workaround for this is to
override the statusBarVisible property and init it to false).

The proper solution here is that we have a getRowCount that returns -1 if
the row count is not loaded yet, and the calling function handles that
properly. In the case of _updateStatusBar it would just clear the status
bar text. In a little while there will be a EVENT_TYPE_DATA_CHANGED event
(when the table row count is actually loaded) and the status bar can be
updated with the correct data.

There are wider implications of returning -1 from getRowCount as it is
used in other places and not checked properly; and a wider review is
required.

Hugh

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to