[KPhotoAlbum] Further investigations of speed issues

Lars Clausen lars at raeder.dk
Wed Nov 1 19:55:09 GMT 2006


Here's a pretty typical session for when I get new images in from the
camera. It should illustrate the problems I have with the speed.  I have
little idea why it takes so long, but I do notice that each of the
delays happen only once per PKA session:

Download pictures from card. Press KPA icon.
Wait for 3 minutes and 30 seconds.

KPA window is ready.  Select "Rescan for images".
Wait 46 seconds.*

Press "Search" icon.
Wait 42 seconds.

Search window pops up.  Select todays date and press Search.  30 images
pop up in thumbnail viewer.  Select them all and choose "Slideshow".  
Wait 1 minute and 26 seconds.

Slideshow starts.  Go through the slideshow and mark the bad images with
token D.  Exit the slideshow and go back to the thumbnail viewer.
There, click the Back icon.  
Wait 1 minute and 26 seconds.

Select Tokens and Ctrl-select token D.  Thumbnail with images to delete
pop up.  Select all and press Delete.
Wait 42 seconds.

Deletion dialog is ready.  Select "Delete".
Wait 35 seconds.

Press "Save".
Wait 5 seconds.

I have now spent about 10 minutes just getting to where I can run a
slideshow, mark some images, and delete those -- with more than 9
minutes of it being spent waiting for KPA.

*) This wait I have some idea about:  It does stat(2) on about 15000
images. It could be reduced significantly by caching last-modified-time
for directories. 

This was done one a 14858-image collection with 9 categories.  The
machine is a Pentium 4 2.8GHz (hyperthreaded) with 512KB cache and 1 GB
memory.  I run SuSE 10.0 kernel 2.6.13 (SMP).  The waits are all
processor-intensive.

I did an strace of the startup, and noticed some mmap2/munmap2 pairs
occurring with about 46 seconds of no other kernel calls happening
between them:

08:04:07.509477 mmap2(NULL, 192512, PROT_READ|PROT_WRITE, MAP_PRIVATE|
MAP_ANONYMOUS, -1, 0) = 0x4190f000
08:04:54.577664 munmap(0x4190f000, 192512) = 0
08:04:54.605546 mmap2(NULL, 192512, PROT_READ|PROT_WRITE, MAP_PRIVATE|
MAP_ANONYMOUS, -1, 0) = 0x4190f000
08:05:41.652406 munmap(0x4190f000, 192512) = 0

If somebody wants to investigate the strace, I've put it up at
http://www.raeder.dk/~larsrc/kpa-strace.gz. 

-Lars




More information about the Kphotoalbum mailing list