Revision 693921

Go back to digest for 5th August 2007

Optimization in KDE Base

Rivo Laks committed changes in /trunk/KDE/kdelibs/kdeui/icons/kpixmapcache.cpp:

Index entries are now stored as a tree instead of as an array.

This allows us to do binary search to find an entry with given key which is much faster than linear search.

The linear search had overhead of about 1us per entry (on my quite fast machine), so if there are thousands of entries in the cache it accumulated to several milliseconds per find(). And if you need to find several entries(some apps need hundreds) then the overhead got quite big.

File Changes

Modified 1 files
  • /trunk/KDE/kdelibs/kdeui/icons/kpixmapcache.cpp
1 files changed in total