D11088: [KFilePlacesView] Call KDiskFreeSpaceInfo only if neccessary

Kai Uwe Broulik noreply at phabricator.kde.org
Tue Mar 6 08:39:36 UTC 2018


broulik created this revision.
broulik added a reviewer: Frameworks.
Restricted Application added a project: Frameworks.
broulik requested review of this revision.

REVISION SUMMARY
  I found this was called 350 times for me when opening the file dialog since for every paint pass it would needlessly call this for every place. It queries all mountpoints and does other expensive work.
  Instead, only do so when the bar would actually be shown. Ideally this would be cached somehow but this patch is a nice simple optimization already.

TEST PLAN
  - Verified it is no longer called when opening file dialog
  - Free space bar still shows up fine when hovering a mounted USB device

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D11088

AFFECTED FILES
  src/filewidgets/kfileplacesview.cpp

To: broulik, #frameworks
Cc: michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180306/96fa6dd7/attachment.html>


More information about the Kde-frameworks-devel mailing list