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

Koos Vriezen koos.vriezen at xs4all.nl
Thu Aug 15 07:18:28 BST 2002


On Wed, 14 Aug 2002, Maks Orlovich wrote:

> Lars Knoll wrote:
>
> > A few comments....
> >
> > The repaint in the original patch shopuld probably be an update() call.
> > This posts the event (instead of triggering the paint event
> > synchronously), so several calls can be merged by Qt. It usually reduces
> > flicker quite a bit and should also make it faster.
>
> Thanks for the suggestion... Koos, could you try with this change and see
> whether it helps? If not, could you please describe more of your testing
> setup.. I timed (clock counters) what you described, and it seems
> signficantly faster with the patch... Also, Lars' suggestion gives me an
> idea of how to reduce flicker: in KonqKfmIconView::newIconSize( int size )
> (konqueror/iconview/knq_iconview.cc), change:
> m_pIconView->arrangeItemsInGrid( ); to:

Yes, it seems faster and no blocking. Now I see one or two repaints when
entering a dir.
Eg. entering /usr/bin the first time. Page is white, lot of disk activity,
when stopped, all icon come at once, two visually repaintings. I see seven
icons/row and a horizontal scrollbar covering about 98%.
Going to /usr/bin/X11, the same. Going back, a small delay, one visual
repaint.
There is something strange in my home dir. When I press reload, I see
seven icons/row. Going one subdir lower and back, icons are layout with
seven icons/row and relayouted to six icons/row. Three visual repaints.
I think, the horizontal scrollbar (appearing/disappearing) is the cause of
the second repaint. In my home dir the scrollbar and relayouting triggers
the second and third repainting.

Hope this helps,

Koos





More information about the kfm-devel mailing list