Review Request: Dolphin - optimize use of PlacesItemModel
Dan Vrátil
dvratil at redhat.com
Fri Nov 9 15:08:15 GMT 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107168/
-----------------------------------------------------------
(Updated Nov. 9, 2012, 3:08 p.m.)
Review request for Dolphin and Frank Reininghaus.
Changes
-------
- fixed all issues
- relicensed PlacesCache to LGPLv2.1+
Description
-------
This patch optimizes PlacesItemModel in two places. The optimizations are needed when using udisks2 Solid backend (which will be shipped in KDE 4.10, but it's already used in KDE 4.9 at least in Fedora). udisks2 is a bit slower because it only can enumerate all devices (unlike udisks where you can ask for specific device) - and that takes time, especially when there are slow devices (cheap USB sticks, slow optical drive).
1) Solid devices are stored in a static cache, which takes care that on startup Solid is only queried once (this eliminates CPU spikes by udisks2d daemon and limits DBus traffic). The Solid query is run asynchronously, which has a positive impact on Dolphin startup time.
2) Don't create new PlacesItemModel on every context menu popup. This effectively eliminates ~4 seconds delay between right click and the context menu appearing on screen. The persistent model is owned by DolphinMainView.
Diffs (updated)
-----
dolphin/src/panels/places/placescache.h PRE-CREATION
dolphin/src/CMakeLists.txt 8f7f4db
dolphin/src/dolphincontextmenu.cpp bb26c7a
dolphin/src/panels/places/placescache.cpp PRE-CREATION
dolphin/src/panels/places/placesitemmodel.h 463e564
dolphin/src/panels/places/placesitemmodel.cpp 1789f18
Diff: http://git.reviewboard.kde.org/r/107168/diff/
Testing
-------
Start up time and opening context menu is faster, no CPU spikes from udisks2d deamon
Thanks,
Dan Vrátil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20121109/94240147/attachment.htm>
More information about the kfm-devel
mailing list