[KimDaBa] performance improvements - patch

Marcel Wiesweg marcel.wiesweg at gmx.de
Sat Jun 12 20:24:19 BST 2004


Hi,

when I started to work with KimDaBa, I noticed first that it is an excellent 
piece of work, and second a few major performance hits:

1. Thumbnail creation. A 64x64 thumbnail from a 3.2 Megapixel image took ~1.2 
seconds on my machine. Imagine me sitting in front of 1000+ images to 
classify...

2. The "one-at-a-time" ImageConfig dialog took veeery long to appear (3 s)

3. Switching to the next image in the same dialogue also took a good time.

I traced all the problems in last consequence down to the thumbnail creation.
The patch attached does the following:

- make use of libjpeg and its scale-while-decoding capability wherever 
possible (now thumbnail takes ~0.2s => factor 6)

- use the excellent ImageManager/ImageLoader infrastructure in the ImageConfig 
dialogue - if necessary, the preview appears after a short delay

- use a preloading mechanism in this dialogue: The next image is preloaded, 
the last is kept in cache. This has the effect that in 'normal' operation the 
preview always appears instantly.

You will see that I added the libjpeg decoding and a central function 
getThumnailName(QString filename) to util.cpp

Marcel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kimdaba-performance.patch
Type: text/x-diff
Size: 18014 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kphotoalbum/attachments/20040612/14ca4ec3/attachment.patch>


More information about the Kphotoalbum mailing list