<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/103408/">http://git.reviewboard.kde.org/r/103408/</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 Calligra.</div>
<div>By Thorsten Zachmann.</div>
<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;">Optimize formula parsing by a factor of 2-4
This optimizes formula parsing by a factor of 2-4. The file
www.worldmapper.org%2Fdata%2Funderlying%2FWorldmapper_U3_hdr%304_tables1-22.ods
loads now in 25 instead of 30 seconds.
The patch tries to avoid creating QString objects when not necessary and reuse
QString object when possible. The reduces the number of allocations quite a lot.
Also implicit casts of 'x' and "foo" are avoided where ever possible as these
are also quite expensive.
e.g. some of the easy optimizations are
if (QString::operator[0] == '$')
is better written as
if (QString::operator[0] == QChar('$', 0)
as this can be optimized already be the compiler and thus reduces the stuff needed
otherwise.
Also initialize class members in initialization list of the constructor where possible
as this avoids copying the data a second time which is also expensive if it is e.g. a
QString.
Additionally to the speed up also the formula parsing now can recognice a escaped " in
a formula and parsing of error codes has been updated to follow ODF 1.2. This fixes the
failing unit tests in TestFormula.
Added unit test for decodeFormula.
</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;">Run the changes against ~ 500 docs and compared the pre patch/after values returned by scan and decodeFormula. The results of decodeFormula where all the same pre/after. The result of scan has changed due to the fixed error and string handling. </pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=288959">288959</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>tables/DependencyManager.cpp <span style="color: grey">(2313e46)</span></li>
<li>tables/Formula.h <span style="color: grey">(5a996f3)</span></li>
<li>tables/Formula.cpp <span style="color: grey">(e79ae1b)</span></li>
<li>tables/Region.h <span style="color: grey">(261beb4)</span></li>
<li>tables/Region.cpp <span style="color: grey">(1920ca9)</span></li>
<li>tables/Util.h <span style="color: grey">(b1879fb)</span></li>
<li>tables/Util.cpp <span style="color: grey">(ac03f0f)</span></li>
<li>tables/tests/CMakeLists.txt <span style="color: grey">(9cc51db)</span></li>
<li>tables/tests/TestUtil.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>tables/tests/TestUtil.cpp <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/103408/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>