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.
Details
Details
- Reviewers
davidedmundson - Group Reviewers
Frameworks - Commits
- R241:cbedf15311aa: [KFilePlacesView] Call KDiskFreeSpaceInfo only if neccessary
- Verified it is no longer called when opening file dialog
- Free space bar still shows up fine when hovering a mounted USB device
Diff Detail
Diff Detail
- Repository
- R241 KIO
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
- Bail out if contentsOpacity is zero, just because the device is mounted and visible doesn't mean it shows its capacity bar (only on hover it would)