[KPhotoAlbum] [Bug 145309] make "show this image" load all images in current view

Jan Kundrát jkt at gentoo.org
Thu May 24 12:26:44 CEST 2007

Robert L Krawitz wrote:
> One problem I've seen with this: if I'm on a cold system, with all of
> my images in the thumbnail view (~20000 images), when I double click
> on one image it takes a few minutes until the image pops up.  On a
> warm system, it's fast, suggesting that it's stat'ing every image (I
> haven't looked at the code).  This bottleneck needs to be eliminated.

Well, I've straced it:

* When the application starts, there's one access(path, R_OK) and two
lstat64() for each file in the DB (or probably rather for each file
under your image root) -- maybe because I have the "check for new images
on startup" enabled. Do you use this as well?

* When the thumbnails are about to be shown, it calls access(path, F_OK)
for each file in the DB that is in current viewport

* When there's one image selected and you choose "view", it calls
access(F_OK) for each image file in current view

So, in short, although my patch indeed queries the FS for availability
of each file in current view, this information should be already
available in the VFS cache since the program startup.

The only reason why it is slow for you that I can imagine is that your
filesystem doesn't cache results of access(path, R_OK) for access(path,
F_OK). What filesystem do you use for your images?

> 1) Viewing a RAW image (a .crw, to be precise) does not rotate the
>    image if it was taken in vertical orientation (it previously did,
>    as of about a month ago).

Could you try to track down what SVN commit broke that?

> 2) The selection in the thumbnail view isn't highlighted -- there's
>    nothing indicating which images are selected or not.  The
>    background's a uniform black, and the images don't get the
>    "dithered" look.

I guess you have both "show label" and "show category" disabled. The
attached patch puts back the pattern over highlighted image when we show
neither categories nor labels, the aspect ratio is not 1:1 and cell
spacing is less than 3px.


cd /local/pub && more beer > /dev/mouth
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: thumbnailwidget-highlight-selection.patch
Url: /mailman/pipermail/kphotoalbum/attachments/20070524/4d9b4af3/attachment.ksh 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : /mailman/pipermail/kphotoalbum/attachments/20070524/4d9b4af3/attachment.pgp 

More information about the KPhotoAlbum mailing list