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

Carsten Pfeiffer carpdjih at sp.zrz.tu-berlin.de
Tue Aug 13 21:15:23 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----

On Tuesday 13 August 2002 21:39, Maks Orlovich wrote:

> There, virtually all of the work done is in KonqIconViewWidget::setIcons,
> where a loop runs through all entries, and sets their icons, telling them
> to recalculate and repaint.. The problem is, the paints are both useless
> and redundant.. At this point in time, my debug shows that the icon view
> item's aren't yet layed out, and so are all at 0,0; where of course they'll
> not stay after getting layed out below; and further, thaty means that every
> single of the icons is painted -- despite the fact that my view is nowhere
> near large enough to show 1000 of files.. And further, the grid re-layout
> below causes a full repaint most of the time anyway.

Nice patch!

The m_pIconView->arrangeItemsInGrid() in newIconSize() seems superfluous as 
well, due to the arrangeItemsInGrid() in setIcons().

void KonqKfmIconView::newIconSize( int size )
{
    KonqDirPart::newIconSize( size );
    m_pIconView->setIcons( size );
    if ( m_pProps->isShowingPreview() )
        m_pIconView->startImagePreview( m_pProps->previewSettings(), true );
    m_pIconView->arrangeItemsInGrid();
}

Cheers
Carsten Pfeiffer
-----BEGIN PGP SIGNATURE-----

iQEVAwUBPVlo26WgYMJuwmZtAQHG+wgAtWEZR6afzLssOgA5Fo8HczT3kflOXu+Z
ayhWUi/cSYJhT79sLiVkhmNgn+0FJTa7sOYhfy/SSS3SkbrceXAIuOQtT2czF11k
sgaTBeUYStCGbq6yaG+YmQBBq9WBhiirMT0oMuDyQGz54hxZhlVuLyvzMxO9Z2it
pw2SWleb7SGIYpVPc8MDtSVSLcHvEyyj/C4K2ariaUELvsBqLn+kGZ8qKiak3Gwg
rtyhWR0XbS7Q6a6p4F+wgVFb1gf5j3I0+sTmA7uxiEFVvwgXCfXUOVQvUgjP7JcA
uC+oM8P8uDlvjNSf9ZQ2+CgsZffufEpaZ7h7P7z4ONRrY7Q6ZbobgQ==
=9qdP
-----END PGP SIGNATURE-----




More information about the kfm-devel mailing list