Review Request 111956: Fix the problem that scrolling is extremely slow when hidden files are shown

Commit Hook null at kde.org
Wed Aug 14 22:49:14 BST 2013


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

(Updated Aug. 14, 2013, 9:49 p.m.)


Status
------

This change has been marked as submitted.


Review request for Dolphin.


Description
-------

The problem was that

KIconLoader::global()->drawOverlays(overlays, m_pixmap, KIconLoader::Desktop);

which is quite slow, is called every time just before an item with overlays appears on the screen. We can fix that by extending the cool icon caching that Emmanuel implemented some time ago: cache not only the pixmaps for the icons, but the pixmaps for icon+overlay. This fixes the problem for the icons.

For the previews, I think it's best to apply the overlays in KFileItemModelRolesUpdater. This ensures that the overlays are applied just once, and not every time the preview is shown on the screen.

The "apply overlays" code is duplicated now, but I still think that this is the cleanest solution. If anyone has better ideas, please let me know!


This addresses bugs 310662 and 314339.
    http://bugs.kde.org/show_bug.cgi?id=310662
    http://bugs.kde.org/show_bug.cgi?id=314339


Diffs
-----

  dolphin/src/kitemviews/kfileitemmodelrolesupdater.cpp 698a6c5 
  dolphin/src/kitemviews/kstandarditemlistwidget.h ecf3a3b 
  dolphin/src/kitemviews/kstandarditemlistwidget.cpp b429211 

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


Testing
-------

Scrolling is much faster when hidden items and symlinks are shown. The overlays are still applied correctly for icons and previews.


Thanks,

Frank Reininghaus

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


More information about the kfm-devel mailing list