<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/103166/">http://git.reviewboard.kde.org/r/103166/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ship It!</pre>
<br />
<p>- Laurent</p>
<br />
<p>On November 17th, 2011, 3:41 p.m., David Faure 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 and Aaron J. Seigo.</div>
<div>By David Faure.</div>
<p style="color: grey;"><i>Updated Nov. 17, 2011, 3:41 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;">Closing a kmail composer window takes a very long time, because it's calling writeConfig() on 7 kconfigskeleton objects (see KMKernel::slotSyncConfig), and each of them calls KConfig::sync() [that's ok, it doesn't do anything if there's no change to save, i.e. no dirty entry] followed by readConfig(), which calls KConfig::reparseConfiguration(). That's a lot of config file parsing, for a case where *nothing has changed*.
Looking into the history of the kconfigskeleton code didn't help finding out why writeConfig calls readConfig, this was added by Waldo in the initial code in 2003.
A real sync() with dirty entries triggers a reparsing (to merge changes on-disk with changes in memory), so it makes sense to propagate the changes from KConfig to the KConfigSkeleton member variables after a sync. But not when sync does nothing at all.</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;">kdecore unittests pass. The testing of "closing a composer window" isn't fully fixed with this patch alone, kmail2rc is still reparsed because the kdeui code that calls revertToDefault on entries that are equal to the default value, makes the config dirty. This requires a different fix which I'll submit separately.</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/config/kconfig.h <span style="color: grey">(51381ca)</span></li>
<li>kdecore/config/kconfig.cpp <span style="color: grey">(fcf0ce9)</span></li>
<li>kdecore/config/kcoreconfigskeleton.cpp <span style="color: grey">(f5dd4bf)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/103166/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>