[Qt-interest] QAbstractListModel Scrolling Performance Issue

Stephan Rose kermos at somrek.net
Wed Dec 3 18:59:07 CET 2008


>When you scroll any of the list views, and I believe this also holds
>true for the tree views, a paint request is made (to the delegate
>responsible for drawing) for *EVERY* single row that you attempt to
>scroll past.  Thus, it doesn't matter how fast you attempt to scroll
>or what you actually end up viewing... it will try to draw everything!
> This also means it has to request data for every single row and
>visible column.

Don't think it's a paint issue because the model becomes fast once I've scrolled all the way to the opposite end at least once. If it was a paint issue, that wouldn't matter.

>
>Since it tries to draw everything, until *ALL* your data has been
>fully fetched it's not going to be ready to display and, therefore,
>will be slow.  It also explains why it's fast once you've viewed all
>the records.  The data has been fetched and is available within the
>model/view.

At the time of my testing however, I've ensured that for a fact all data was already fetched and put into the model's data storage used by the ::data() call. So the problem isn't in the fetching of the data from the SQL Server. The model doesn't even know the SQL Server exists. 

Thanks,

Stephan



More information about the Qt-interest-old mailing list