diff options
| author | Frank Reininghaus <[email protected]> | 2013-05-22 18:27:05 +0200 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2013-05-22 18:27:44 +0200 |
| commit | bf85483c99b549334cff3e83e861121748d5d5c1 (patch) | |
| tree | 4845bfcdb304635b2b410ca2440829f1ff6007e4 /src/filterbar | |
| parent | 01761798a93bc93f3e16f8fb68fe5739ab66d98b (diff) | |
KFileItemModel::insertItems(): guarantee O(N) run time complexity
This commit prevents repeated insertions of single items into the list
m_itemData, which shift all following items by one position and result
in O(N^2) worst case complexity for the entire function.
Moreover, the hash m_items is updated only for the items starting from
the first inserted/removed item to save some superfluous calculations
of hash values.
REVIEW: 110355
Diffstat (limited to 'src/filterbar')
0 files changed, 0 insertions, 0 deletions
