[KPhotoAlbum] PATCH: improve speed for big thumbnail views

Henner Zeller h.zeller at acm.org
Wed May 2 22:12:10 BST 2007


Hi,
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
ImageRequest::operator<().

   http://vicdor.org/kpatches/#fast-unique-pending-request-queue

This patch is referenced in the wiki page already.

cheers,
  -henner

On 5/1/07, Henner Zeller <h.zeller at acm.org> wrote:
> Hi,
> 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).
>
> cheers,
>   -henner
>


-- 
Henner Zeller | h.zeller at acm.org
Bücher kaufen und freie Software fördern | http://bookzilla.de



More information about the Kphotoalbum mailing list