[KPhotoAlbum] PATCH: improve speed for big thumbnail views
h.zeller at acm.org
Wed May 2 23:12:10 CEST 2007
After the previous memory leak patch is applied now, here is the speed
improvement patch. I also added some comments to the RequestQueue
header and removed unnecessary default constructors of ImageRequest
and ThumbnailRequest. And fixed a comparison bug in
This patch is referenced in the wiki page already.
On 5/1/07, Henner Zeller <h.zeller at acm.org> wrote:
> Having small thumbnails on a big screen results in many ImageRequests
> to be added to ImageManager::RequestQueue::addRequest() which does a
> check that it doesn't have the same request already in the queue.
> Because this just goes through the list linearly, the whole stuff is
> an O(n^2) operation ... which takes considerable time if you want to
> display 3500 thumbnails on one screen (yes, I have a big screen).
> I changes this now that it does a lookup in a set which speed this up
> considerably (around factor 2 in my case).
> This patch modifies the same file (RequestQueue.cpp) as in one of my
> previous patches (remove-image-request-memleaks) so I wait until that
> one is applied before posting this here (otherwise it gets messy).
Henner Zeller | h.zeller at acm.org
Bücher kaufen und freie Software fördern | http://bookzilla.de
More information about the KPhotoAlbum