KFileIVI optimization: less QPixmaps created

David Faure faure at kde.org
Wed Jun 9 17:13:04 CEST 2004


On Wednesday 09 June 2004 16:31, Carsten Pfeiffer wrote:
> On Wednesday 09 June 2004 15:13, David Faure wrote:
> 
> Hi,
> 
> > I was reading a very old mail from Carsten Pfeiffer about possible
> > optimizations in libkonq's KFileIVI ("icon view item"), and he mentionned
> > the fact that QPixmaps are created in there even when not using thumbnails.
> > Since the QPixmap constructor calls XCreatePixmap immediately (even for
> > null pixmaps), we might gain from building those pixmaps on demand. I've
> 
> IIRC, I was wrong on that, there's a return-statement somewhere in the middle 
> of the QPixmap constructor, so that XCreatePixmap() is not called for null 
> pixmaps... so that optimization should not be necessary.

Oh, I got confused by the QPixmap warnings from KApplication when creating a non-gui kapp.
The warning is at the top of ::init(), but the XCreatePixmap call is indeed not done
for null pixmaps. Ah well, throwing away the patch then.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the Kde-optimize mailing list