<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/111560/">http://git.reviewboard.kde.org/r/111560/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On July 18th, 2013, 10:39 a.m. UTC, <b>Boudewijn Rempt</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;">Hm, I don't know... I doubt it actually makes a difference in most if not all of the cases -- for instance, changing the way a string is constructed for a dialog will not make the dialog pop up perceptibly faster, and I see very few if any critical path cases here. And in almost all cases there's more code than there was before, which makes for harder reading.</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;">It's less about dialogs, but more about the filters. Or the query builders (calligradb, kexi, sheets, ...). In both cases lots of long consecutive additions of QStrings are done. And those definitely are on the hot paths.
Given the large codebase of Calligra I was surprised how few fixes I had to do for where the implicit conversion from QString did not work any longer, due to the additional one between QStringBuilder and QString. So it's not that much extra code, the big majority of QString places could stay unchanged.
I also have a follow-up patch which builds up on this one, where I turn multiple (x += ...) into a single x = ... + [...] + ..., where useful. 40+ places. And I did not yet go for all places, just some randoms one I found on grepping for +=
So think this is still worthwhile. No numbers yet. But it should be expected to improve things, given the saved mallocs. And for that it's really not that much extra code needed, in absolute terms.</pre>
<br />
<p>- Friedrich W. H.</p>
<br />
<p>On July 18th, 2013, 10:25 a.m. UTC, Friedrich W. H. Kossebau 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 Calligra.</div>
<div>By Friedrich W. H. Kossebau.</div>
<p style="color: grey;"><i>Updated July 18, 2013, 10:25 a.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;">There are lots of string concatenations all over, so using QStringBuilder might speedup things a little.</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>3rdparty/kdchart/CMakeLists.txt <span style="color: grey">(b7178e6)</span></li>
<li>CMakeLists.txt <span style="color: grey">(4f38f33)</span></li>
<li>active/src/CAPADocumentModel.cpp <span style="color: grey">(f8c03d0)</span></li>
<li>active/src/CATextDocumentModel.cpp <span style="color: grey">(296c964)</span></li>
<li>braindump/plugins/stateshape/StatesModel.cpp <span style="color: grey">(e847a34)</span></li>
<li>braindump/src/SectionsIO.cpp <span style="color: grey">(d5534fa)</span></li>
<li>filters/words/epub/OdtHtmlConverter.cpp <span style="color: grey">(8aac224)</span></li>
<li>filters/words/mobi/OdtMobiHtmlConverter.cpp <span style="color: grey">(679fcd9)</span></li>
<li>filters/words/msword-odf/conversion.cpp <span style="color: grey">(e161199)</span></li>
<li>kexi/main/startup/KexiRecentProjectsModel.cpp <span style="color: grey">(6c5e078)</span></li>
<li>kexi/plugins/importexport/csv/kexicsvimportdialog.cpp <span style="color: grey">(a75d7cd)</span></li>
<li>kexi/plugins/queries/kexiquerydesignerguieditor.cpp <span style="color: grey">(01de184)</span></li>
<li>kexi/widget/navigator/KexiProjectModelItem.cpp <span style="color: grey">(6e50585)</span></li>
<li>krita/image/metadata/kis_meta_data_value.cc <span style="color: grey">(aa507cc)</span></li>
<li>krita/image/tests/kis_meta_data_test.cpp <span style="color: grey">(f520113)</span></li>
<li>krita/plugins/extensions/dockers/compositiondocker/compositiondocker_dock.cpp <span style="color: grey">(81edeab)</span></li>
<li>krita/plugins/paintops/libpaintop/kis_pressure_hsv_option.cpp <span style="color: grey">(957f927)</span></li>
<li>krita/sdk/tests/filestest.h <span style="color: grey">(d14e748)</span></li>
<li>krita/ui/kis_doc2.cc <span style="color: grey">(f18d718)</span></li>
<li>libs/db/RecordData.cpp <span style="color: grey">(1152e74)</span></li>
<li>libs/db/connectiondata.cpp <span style="color: grey">(23fb5ad)</span></li>
<li>libs/db/field.cpp <span style="color: grey">(ec9a7a9)</span></li>
<li>libs/db/queryschema.cpp <span style="color: grey">(9c0f771)</span></li>
<li>libs/koreport/items/text/krscripttext.cpp <span style="color: grey">(dc1d4ab)</span></li>
<li>plan/libs/kernel/tests/CalendarTester.cpp <span style="color: grey">(eae353c)</span></li>
<li>plan/libs/kernel/tests/ProjectTester.cpp <span style="color: grey">(f3e837b)</span></li>
<li>plan/libs/kernel/tests/WorkInfoCacheTester.cpp <span style="color: grey">(34b299e)</span></li>
<li>plan/libs/models/kptnodeitemmodel.cpp <span style="color: grey">(60ed7bf)</span></li>
<li>plan/libs/models/kptpertcpmmodel.cpp <span style="color: grey">(621f78a)</span></li>
<li>plan/libs/models/kptrelationmodel.cpp <span style="color: grey">(1b60698)</span></li>
<li>plan/plugins/schedulers/rcps/tests/ProjectTester.cpp <span style="color: grey">(26595f1)</span></li>
<li>plan/plugins/schedulers/tj/tests/SchedulerTester.cpp <span style="color: grey">(d447d14)</span></li>
<li>plan/plugins/schedulers/tj/tests/TaskJuggler.cpp <span style="color: grey">(a8474d6)</span></li>
<li>plan/plugins/scripting/Project.cpp <span style="color: grey">(b9d9ce0)</span></li>
<li>plugins/dockers/shapecollection/ShapeCollectionDocker.cpp <span style="color: grey">(d08ee37)</span></li>
<li>plugins/musicshape/core/tests/MusicXmlWriterTest.cpp <span style="color: grey">(ca9a005)</span></li>
<li>words/part/KWDocument.cpp <span style="color: grey">(57aba26)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/111560/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>