<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/101512/">http://git.reviewboard.kde.org/r/101512/</a>
</td>
</tr>
</table>
<br />
<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 and Peter Penz.</div>
<div>By Dawit Alemayehu.</div>
<p style="color: grey;"><i>Updated June 5, 2011, 10: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;">The attached single line patch fixes KFilePreviewGenertor such that it does not completely block the GUI thread and hence lock up the application when you enable and disable preview in a directory that contains large number of files.
This fix still only solves the problem partially in that the app will no longer lock up for a very long period of time. Instead you get a few second lockup if you have an old machine like mine (Pentium D). It might not be noticable on much faster machines. However, such lock ups are to be expected because of how this class is designed to work. It is one of those few classes that can really benefit from being multi-threaded. Perhaps based on the ideas from http://labs.qt.nokia.com/2010/01/21/qt-graphics-and-performance-generating-content-in-threads/.</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;">The following test was done to confirm the problem as well as to test the fix:
- In Dolphin or Konqueror, enable HTML file preview.
- Navigate to Qt's html documentation folder (/usr/share/doc/qt/html on my system).
- Turn on preview if it is not already enabled.
- Scroll up and down to see the preview working.
- Disable preview and see what happens.
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> (updated)</h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>kfile/kfilepreviewgenerator.cpp <span style="color: grey">(50a3db7)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/101512/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>