Hey Rutger,

2010/4/20 Rutger ter Borg <[email protected]>:
> I see the canFetchMore/fetchMore pair is missing in Wt's abstract item model
> (w.r.t. Qt's). What would be the recommended way of implementing large /
> remote models with Wt?

Good point.

These missing methods would however only solve the need for being able
to obtain an accurate rowCount() or columnCount(). In other words,
unless these two operations are very expensive for your custom model,
there would not be a benefit of canFetchMore/fetchMore.

The WTreeView will not attempt to read more data from your model than
needed, so in that sense, there is no problem in supporting big
models. We have been using SQL-based models, which implement
rowCount() using "select count (*)" (which was subsequently cached)
which suffered very little from being backed by big results sets.

So I would recommend to make sure that you maintain a small "local"
cache in your model for data and row/column counts to minimize
potentially expensive computations, and rely on the view class to only
fetch the data from the model that it actually needs.

Regards,
koen

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to