Review Request 111226: Fix performance regression when loading many items in Details View

Commit Hook null at kde.org
Wed Jun 26 20:22:15 BST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111226/
-----------------------------------------------------------

(Updated June 26, 2013, 7:22 p.m.)


Status
------

This change has been marked as submitted.


Review request for Dolphin.


Description
-------

The other day, I was going to reply to Emmanuel's comment in https://bugs.kde.org/show_bug.cgi?id=306290 and thought that I would better first compare how long loading a large folder takes in KDE/4.10 and master. To my surprise, I found that it was much slower in master, at least when using Details View.

The reason is that we receive the items from the dir lister in multiple bunches, and after the KFileItemModel changes, all these are inserted into the model immediately when Details View is used (in KDE/4.10, this is only done after the initial folder loading is finished). Inserting items in multiple bunches, however, is rather inefficient at the moment - even though all operations inside KFileItemModel are O(N) now, there are still some O(N^2) functions hidden in KItemListSizeHintResolver. This is worth fixing as well, of course. I'll look into that later.

The reason why there is a different treatment of the bunches at all in Details View is that we must make sure that parent items are in the model when we receive their children. I propose to only insert the pending items immediately if the new items are indeed children of an expanded folder.


Diffs
-----

  dolphin/src/kitemviews/kfileitemmodel.cpp f6b51f2 

Diff: http://git.reviewboard.kde.org/r/111226/diff/


Testing
-------

Loading a large folder in Details View is significantly faster.


Thanks,

Frank Reininghaus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20130626/c4cc2324/attachment.htm>


More information about the kfm-devel mailing list