[KPhotoAlbum] PATCH: improve speed for big thumbnail views

Henner Zeller h.zeller at acm.org
Tue May 1 16:17:36 CEST 2007

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


More information about the KPhotoAlbum mailing list