[KPhotoAlbum] Another performance issue

Robert Krawitz rlk at alum.mit.edu
Sun Jan 5 18:07:00 GMT 2020


I've determined that

DB::FileNameList ThumbnailView::ThumbnailWidget::selection(ThumbnailView::SelectionMode mode) const

is being called once per image, and each time it loops over all images
currently in the set, so it's quadratic (these lines are >>>in and
<<<out, with the incrementing number being the number of times through
the loop).

kphotoalbum.ThumbnailWidget: >>> ThumbnailWidget::Selection 1
kphotoalbum.ThumbnailWidget: <<< ThumbnailWidget::Selection 3426 0
kphotoalbum.ThumbnailWidget: >>> ThumbnailWidget::Selection 1
kphotoalbum.ThumbnailWidget: <<< ThumbnailWidget::Selection 3427 0
kphotoalbum.ThumbnailWidget: >>> ThumbnailWidget::Selection 1
kphotoalbum.ThumbnailWidget: <<< ThumbnailWidget::Selection 3428 0
kphotoalbum.ThumbnailWidget: >>> ThumbnailWidget::Selection 1
kphotoalbum.ThumbnailWidget: <<< ThumbnailWidget::Selection 3429 0
kphotoalbum.ThumbnailWidget: >>> ThumbnailWidget::Selection 1
kphotoalbum.ThumbnailWidget: <<< ThumbnailWidget::Selection 3430 0
kphotoalbum.ThumbnailWidget: >>> ThumbnailWidget::Selection 1
kphotoalbum.ThumbnailWidget: <<< ThumbnailWidget::Selection 3431 0

-- 
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



More information about the Kphotoalbum mailing list