[KPhotoAlbum] One more patch (thumbnail text height calculation)

Robert Krawitz rlk at alum.mit.edu
Sun Jan 12 23:07:34 GMT 2020


I was trying to squeeze a bit more and when profiling found that a
surprising amount of time was being spent just calculating the height
of the text area in the thumbnail view.  That's because it loops over
all of the categories on an image, checks that they're not the folder
name or media type, and checks that the set of items in that category
is not empty.

Eliminating that, by simply taking the number of categories on the
image and subtracting 2 (all images have a media type and at least one
folder), makes a noticeable difference when displaying a large number
of thumbnails (in my case, currently about 380K images, modestly fewer
thumbnails because of stacks).  It's not an overwhelming difference,
but it's very much noticeable with that many thumbnails.

The biggest overhead right now seems to be setting up the map widget,
particularly the first time through when it dynamically loads a bunch
of stuff.  I don't use that personally.
-- 
Robert Krawitz                                     <rlk at alum.mit.edu>

***  MIT Engineers   A Proud Tradition   http://mitathletics.com  ***
Member of the League for Programming Freedom  --  http://ProgFree.org
Project lead for Gutenprint   --    http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thumbnail-text-height-calculation.patch
Type: application/octet-stream
Size: 1062 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kphotoalbum/attachments/20200112/82868b71/attachment.obj>


More information about the Kphotoalbum mailing list