[PATCH] Speed up iconView's setIcons 2x...

Maks Orlovich mo002j at mail.rochester.edu
Tue Aug 13 21:55:55 BST 2002


Koos Vriezen wrote:

> On Tue, 13 Aug 2002, Maks Orlovich wrote:
> 
>> Thus, the speed up from the attached patch is considerable. It reduces
>> the time to apply the icons here to about 600ms; about 200ms of that is
>> due to loading/getting the pixmaps, and the 400ms left is basically due
>> to calcRect() calling boundingRect(0 of its font metrics to ask it to
>> wrap the text. Since the latter involves the rich-text path of
>> qt_format_text I'll pass on that.. And anyway, overall, this seems to cut
>> the overallt imes to 1.5 seconds - in half..
>>
>>
>> Comments, thoughts, suggestions? Should I bug the Trolls about the above
>> code in Qt?
> 
> At first it looks fast, but it seems to block more. When going from a
> large dir to another and back again, the old flikkering behaviour
> re-appears and it blocks for a while. Small dirs, due to blocking, seems
> to be slower with this patch.
> (All measure done with a wet finger in the wind)

Hmm, it shoud definitely be faster for large directories... What Qt version 
are you using? But small directories are a good point; if the method is 
called without being told to rearrange then for a small one repainting the 
updates one may be faster indeed... I also probably need to check whether 
repaint() is the best way to call an update here..







More information about the kfm-devel mailing list