[KPhotoAlbum] Performance Improvements

Johannes Zarl-Zierl johannes at zarl-zierl.at
Sun Dec 13 23:23:44 GMT 2015


Hi Andreas,

Thanks for the patches!

I've pushed the first two commits into the master branch.

As far as the third one goes, I think it's better switch most iterator loops 
to Q_FOREACH altogether.
I have done a patch today implementing this (at least for non-const 
iterators). I'll just wait for some stuff that Tobias is working on to be 
merged to master before I push it.

Cheers,
  Johannes

On Friday 11 December 2015 21:47:08 Andreas Neustifter wrote:
> 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/fef00a2903d55
> 2de1d647574a945be07d224f394
> 
> 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/26bb80af00c87
> 2121f2ab8dbca5c33223a481d59
> 
> 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/1882b2efa269d
> c29d31cc6c61233f82928a07e38
> 
> I'm not pushing this directly since my KPA coding is a little rusty and I
> didn't want to barge in :)
> 
> Andreas




More information about the Kphotoalbum mailing list