[KPhotoAlbum] PATCH: improve speed for big thumbnail views
h.zeller at acm.org
Tue Aug 7 21:18:43 CEST 2007
First of all, sorry that I haven't been really active the last couple
of weeks .. will try to allocate more programming time slices from my
> I've applied your patch locally and have seen no problems so far.
> However, I don't see any speed improvements, to be honest :). Under what
> circumstances can I see the difference?
With very many thumbnails on your screen. I have a 30" Monitor and get
several thousand thumbnails on the screen. For each thumbnail that was
added to the RequestQueue it did an O(n) operation to check if there
was already similar pending request. Adding n requests means that this
is a O(n^2) operation - with around 4000 images on one screen, this
makes a considerable difference.
> Another question is about your removal of a constructor for
> ImageManager::ImageRequest. Unless I'm mistaken, default constructor
> simply sets up all variables to the "initial" state, which is false for
> bool, while the original constructor sets them to true. Is that
> intentional or am I mistaken?
The default constructor was never used and it actually makes no sense
to use it because it creates a meaningless object whose content cannot
be changed afterwards.
In removing the default constructor, its possible to let the compiler
find inappropriate uses of it - it will spit out the error that will
say that there is no such constructor.
More information about the KPhotoAlbum