<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/111462/">http://git.reviewboard.kde.org/r/111462/</a>
     </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">What if e->dirty was already true before entering the whole function?
I think you'll have to save the old value before the e->dirty=true statement, and test it near your new code.

Looks good otherwise.</pre>
 <br />









<p>- David</p>


<br />
<p>On July 14th, 2013, 11:57 p.m. UTC, Dawit Alemayehu wrote:</p>








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

<div>Review request for kdelibs and David Faure.</div>
<div>By Dawit Alemayehu.</div>


<p style="color: grey;"><i>Updated July 14, 2013, 11:57 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;">The attached patch changes the logic that attempts to deal with a flood of the dirty signals received by KDirLister when existing files are change. The current code simply puts the file in an update pending list and starts a delayed timer (500 ms) to process the request. As a result, every half a second or so the pending update request is processed. This would have been fine were it not for the fact that the processing results in a call to KFileItem::refersh which does a stat the local file. Hence, a stat is done on the file being downloaded every 500 ms. Additionally, some other code is also doing a stat every half second on the
  download destination directory as well.

This patch attempts to prevent the flood of stat calls by restarting the update timer if we get another dirty signal on a file that is already in the update pending list. IOW, we only do the last stat call. The downside of doing that is the information about the file being download will be stale until the download finishes. Unfortunately I still have not been able to figure out what is doing the stat on the destination directory itself and hence do not have a solution for that yet. Any ideas?</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </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;">- strace an instance of Konqueror or Dolphin.
- copy a file from a remote location (ftp,sftp, smb) to your local file system.
- check if there is a flood of stat calls on both the file being copied and its destination directory.</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>kdecore/io/kdirwatch.cpp <span style="color: grey">(a325f0f)</span></li>

</ul>

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







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








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