[PATCH] Speed up iconView's setIcons 2x...
Koos Vriezen
koos.vriezen at xs4all.nl
Sat Aug 24 12:50:36 BST 2002
On Fri, 23 Aug 2002, David Faure wrote:
> On Friday 23 August 2002 20:09, Koos Vriezen wrote:
> > On Fri, 23 Aug 2002, David Faure wrote:
> > > On Friday 23 August 2002 19:29, Koos Vriezen wrote:
> > > >
> > > > Ok, shouldn't the iconview sort it first before painting?
> > >
> > > Since the items are all inserted in a single loop, I thought it would, yes...
> > > Needs investigating.
> >
> > And if it isn't? What use are icons jumping in the view all the time?
> > Unless item come very slow (eg. a repaint/2 sec then), I don't mind
> > waiting for the items.
>
> Well, it's just like progressive rendering in khtml. It gives feedback earlier
> to the user (and doesn't look like the app isn't working at all for a long time).
Ok, did some tracing on QIconView::arrangeItemsInGrid ():
#0 0x40b12695 in QIconView::arrangeItemsInGrid ()
from /mnt/hda7/local/koos/qt3/lib/libqt-mt.so.3
#1 0x41254955 in KonqKfmIconView::newIconSize ()
from /mnt/hda3/usr/local/kde3/lib/kde3/konq_iconview.so
#2 0x412567c2 in KonqKfmIconView::doOpenURL ()
from /mnt/hda3/usr/local/kde3/lib/kde3/konq_iconview.so
#3 0x4010c0e0 in KonqDirPart::openURL ()
<icons are redrawn unsorted>
#0 0x40b12695 in QIconView::arrangeItemsInGrid ()
from /mnt/hda7/local/koos/qt3/lib/libqt-mt.so.3
#1 0x40b1a2f0 in QIconView::sort ()
from /mnt/hda7/local/koos/qt3/lib/libqt-mt.so.3
#2 0x40b10b24 in QIconView::slotUpdate ()
#13 0x4091de00 in qt_activate_timers ()
<icons are redrawn sorted>
Just commenting out arrangeItemsInGrid() in KonqKfmIconView::newIconSize
already helps:
--- ./iconview/konq_iconview.cc 2002/08/21 15:42:19 1.410
+++ ./iconview/konq_iconview.cc 2002/08/24 11:42:47
@@ -595,7 +595,7 @@ void KonqKfmIconView::newIconSize( int s
m_pIconView->setIcons( size );
if ( m_pProps->isShowingPreview() )
m_pIconView->startImagePreview( m_pProps->previewSettings(), true
);
- m_pIconView->arrangeItemsInGrid();
+ //m_pIconView->arrangeItemsInGrid();
}
So if this call is really necessarry for progressive loading, I would
suggest to do this in a timer event that only does it when it's not
completed. But I have to find a site that needs it yet.
Can someone test this patch and confirm less flickering (going back and
forward in the history)?
Koos
More information about the kfm-devel
mailing list