[Qt-interest] qwidget performance

Tomasz Grobelny tomasz at grobelny.oswiecenia.net
Sun Jun 19 23:52:13 CEST 2011


On Thu, 16 Jun 2011 19:18:18 +0200, Bo Thorsen <bo at fioniasoftware.dk>
wrote:
> Den 15-06-2011 11:53, Tomasz Grobelny skrev:
>> Actually I doubt I will ever need 100000 widgets but considering they
>> might be more complicated than QPushButton I just wanted to test
>> performance.
> 
> This statement really annoys me. Don't test something you don't need to 
> know. At least don't ask on this list about it!
> 
> Test up to a single magnitude larger than reasonable expectation - like 
> testing 1.000 widgets if you expect to use 100. All results from bigger 
> test sets will at best just give you unusable data. Worst case is if you

> would do something like decide against Qt because it doesn't scale to 
> 1.000 times your expected use.
> 
In my scenario I expected to have something like 1000 widgets in ordinary
use case and I could imagine user not unloading the data for a day or two
and get to around 10000 widgets. So testing 100000 widgets was in my
opinion reasonable. Not to decide against Qt, but to either find a flaw in
my code or in my design (it seems to be the latter).
It turns out that creating a widget for every item is not the way to go
and it will have to be done differently. Currently it seems to me that
custom implementation of QAbstractScrollArea might be the best solution
(clearly not all of those 10000 items are visible at once).
-- 
Regards,
Tomasz Grobelny



More information about the Qt-interest-old mailing list