<table><tr><td style="">broulik created this revision.<br />broulik added a reviewer: Frameworks.<br />Restricted Application added a project: Frameworks.<br />broulik requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D11088">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>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.<br />
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.</p></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">Verified it is no longer called when opening file dialog</li>
<li class="remarkup-list-item">Free space bar still shows up fine when hovering a mounted USB device</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D11088">https://phabricator.kde.org/D11088</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/filewidgets/kfileplacesview.cpp</div></div></div><br /><div><strong>To: </strong>broulik, Frameworks<br /><strong>Cc: </strong>michaelh<br /></div>