No more unknown icons
Review Request #111396 - Created July 4, 2013 and submitted
A disadvantage of my recent changes in KFileItemModelRolesUpdater is that one can actually see "unknown" icons when scrolling quickly to another part of the view in directories with many items. I tried to minimize the risk that this happens by spending some time (of the 200 ms which we always accept for synchronous updates) for loading icons of all items without determining the mime type. But in directories with many items, this is not enough. Maybe it's better to just load icons for items which do not have an icon yet on demand, i.e., just before the widget is shown on the screen. After David's recent improvements in KFileItem, KFileIcon::iconName() should be fast enough.
I never see unknown icons any more, and the performance still feels similar. If anyone sees regressions with this commit, please let me know!
Review request changed
Removed some more code in KFileItemModelRolesUpdater which is not needed any more if KFileItemListView loads preliminary icons just before items are shown on the screen. It's already a bit too late for RC 1 now, but if noone sees obvious problems with this approach, I'd like to push this soon, such that it gets some more testing in the 4.11 branch and then in RC 2.
Revision 2 (+20 -86)
It looks good, but i haven't tested it yet. I will give it some thorough testing tonight on my massive folders :D And on some slower network drives. I will report back later today or early tomorrow morning.
My first Ship it ever :) I gladly give it to a patch this neat! I just tested it on some massive folders, a network drive and an ftp location. It all works very well and really gives me a much smoother file browsing experience then ever before with Dolphin! This patch is certainly not "the" patch that gives me that impression, but one of "the" patches. Those together are truly awesome!