[KPhotoAlbum] Performance Improvements

Andreas Neustifter andreas.neustifter at gmail.com
Fri Dec 11 21:47:08 GMT 2015


Hej guys,

I have noticed that KPA was getting slower and slower with the size of my
library. Especially stuff that was fast with 25k photos was considerably
slower with now 50k pics.
(E.g. showing the thumbnail view.)

I used the google perftools (BIG recommendation from me, they are a breeze
to use and provide the perfect insights) to hunt down some of the problems:

In there is a index cache that was not used
in ThumbnailView::ThumbnailModel::requestThumbnail(), this is fixed in
https://github.com/astifter/kphotoalbum-astifter-branch/commit/fef00a2903d552de1d647574a945be07d224f394

Also the blocked file list (pretty big with my DB) was stored in a QList
instead of a QSet, this is fixed as well (improves startup time).
https://github.com/astifter/kphotoalbum-astifter-branch/commit/26bb80af00c872121f2ab8dbca5c33223a481d59

While I was at it (tried to fix DB::FileNameList instead of the root case
in ThumbnailView::ThumbnailModel I stumbled over some relicts and fixed
those:
https://github.com/astifter/kphotoalbum-astifter-branch/commit/1882b2efa269dc29d31cc6c61233f82928a07e38

I'm not pushing this directly since my KPA coding is a little rusty and I
didn't want to barge in :)

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kphotoalbum/attachments/20151211/6dc2b7c0/attachment.htm>


More information about the Kphotoalbum mailing list