Revision 6c157fc...

Go back to digest for 7th July 2013

Optimization in KDE Base

Frank Reininghaus committed changes in [kde-baseapps] dolphin/src/kitemviews/kitemlistview.cpp:

Fix O(N^2) complexity issue in KItemListView::slotItemsRemoved()

If many item ranges are removed, KItemListView::slotItemsRemoved()
could take very long because it looped over all items after the first
removed one for every removed range, even if most of these items are
not visible at all.

This commit improves this by just looping over the visible items (whose
number is limited by the window size) for each range.

Test case (for very large N):

touch {1..N}.png
touch {1..N}.jpg

(wait until all files are shown in the view)

rm *.jpg

REVIEW: 111398

File Changes

Modified 1 files
  • dolphin/src/kitemviews/kitemlistview.cpp
1 files changed in total