Cache icon and accessibility in KFilePlacesItem

Review Request #107030 - Created Oct. 24, 2012 and submitted

Information
Daniel Vrátil
kdelibs
Reviewers
kdelibs
Similar to what Dolphin does in the "Places" pane, the open/save dialog should cache devices' icons, emblems and whether it's accessible, rather then querying Solid::Device all the time. Querying can cause Solid to ask udisksd to enumerate all devices (because with udisksd2 you can't ask for just a single device), which can take a lot of time (especially when slow devices like NFS shares or slow USB sticks are present).

Since this is a model item, the values are queried quite a lot, causing high CPU load from udiskds and the calling application blocks. Just try to quickly move mouse over Solid devices in the open/save dialog and what your CPU load).

Most visible result of this caching is that the dialog is presented faster and you can smoothly resize the "Places" pane.

Lukas Tinkl will try to optimize the Solid Udisks backend a bit to make it even faster, as this problem with device icons causing querying udisksd has impact on Dolphin start up time (and with this patch it has similar impact on the dialog show-up time).

  
Christoph Feck
Christoph Feck
Commit Hook
Daniel Vrátil
Review request changed

Status: Closed (submitted)

Loading...