<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/107030/">http://git.reviewboard.kde.org/r/107030/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On October 24th, 2012, 11:26 p.m., <b>Christoph Feck</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Let me understand, what you are proposing. If Solid is slow returning the values, then the caching should be in Solid, not in every application that uses it. But until that is implemented in Solid, we could use this workaround in kfile.

If that is right, I wonder what time frame is expected for a possible Solid fix. I am not familar with internals in Solid, but a patch there should be of similar complexity as this one, and I would rather wait for it instead of cluttering kfile with a workaround. If the Solid fix, however, is not expected before 4.10, then "Ship it!"</pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">If the fix is possible, it will be most probably in 4.9.x. However calling repeatedly Solid still causes some overhead. This change is quite small, has positive impact on performance and does not really make the code more complex, so I pushed it. 

We can always drop it from 4.10.</pre>
<br />








<p>- Dan</p>


<br />
<p>On October 24th, 2012, 9:13 p.m., Dan Vrátil wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for kdelibs.</div>
<div>By Dan Vrátil.</div>


<p style="color: grey;"><i>Updated Oct. 24, 2012, 9:13 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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).</pre>
  </td>
 </tr>
</table>





<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>kfile/kfileplacesitem.cpp <span style="color: grey">(3ada0c3)</span></li>

 <li>kfile/kfileplacesitem_p.h <span style="color: grey">(3c6bd30)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/107030/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>