[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Review Request: Switch from using QXmlReader to using
From: "Thorsten Zachmann" <t.zachmann () zagge ! de>
Date: 2010-08-11 5:23:00
Message-ID: 20100811052300.10634.59778 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4967/#review6983
-----------------------------------------------------------
Ship it!
I have tested the patch with various documents and all worked as expected. =
I can confirm that there is a speedup of around 5-6% which is quite nice. A=
lso the memory consumption is equal to the old solution. Good work.
trunk/koffice/libs/odf/KoOdfReadStore.cpp
<http://reviewboard.kde.org/r/4967/#comment7013>
can you move this comment to where report-whitespace-only-CharData is s=
et
- Thorsten
On 2010-08-10 18:35:05, vandenoever wrote:
> =
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/4967/
> -----------------------------------------------------------
> =
> (Updated 2010-08-10 18:35:05)
> =
> =
> Review request for KOffice.
> =
> =
> Summary
> -------
> =
> Switch from using QXmlReader to using QXmlStreamReader. This simple port =
gives a speedup of 5% on a document with a lot of text. Quite a few more op=
timizations are possible now by taking advantage of QStringRef.
> =
> =
> Diffs
> -----
> =
> trunk/koffice/filters/libmsooxml/MsooXmlUtils.cpp 1161556 =
> trunk/koffice/filters/liboofilter/ooutils.cc 1161556 =
> trunk/koffice/libs/odf/KoOdfReadStore.h 1161556 =
> trunk/koffice/libs/odf/KoOdfReadStore.cpp 1161556 =
> trunk/koffice/libs/odf/KoXmlReader.h 1161556 =
> trunk/koffice/libs/odf/KoXmlReader.cpp 1161556 =
> trunk/koffice/libs/odf/tests/TestXmlReader.cpp 1161556 =
> =
> Diff: http://reviewboard.kde.org/r/4967/diff
> =
> =
> Testing
> -------
> =
> TestXmlReader passes fine.
> =
> =
> Thanks,
> =
> vandenoever
> =
>
[Attachment #5 (text/html)]
<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://reviewboard.kde.org/r/4967/">http://reviewboard.kde.org/r/4967/</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;">I have tested the patch \
with various documents and all worked as expected. I can confirm that there is a \
speedup of around 5-6% which is quite nice. Also the memory consumption is equal to \
the old solution. Good work.</pre> <br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="/r/4967/diff/1/?file=33549#file33549line140" style="color: black; font-weight: \
bold; text-decoration: underline;">trunk/koffice/libs/odf/KoOdfReadStore.cpp</a> \
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">bool \
KoOdfReadStore::loadAndParse(const QString &fileName, KoXmlDocument &doc, \
QString &errorMessage)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">138</font></th> <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="c1">// We \
need to be able to see the space in <text:span> </text:span>, this is \
why</span></pre></td> <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; \
border-right: 1px solid #C0C0C0;" align="right"><font size="2">128</font></th> <td \
bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; "> <span class="n">QXmlStreamReader</span> <span class="n">reader</span><span \
class="p">(</span><span class="n">fileDevice</span><span \
class="p">);</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">can you \
move this comment to where report-whitespace-only-CharData is set</pre> </div>
<br />
<p>- Thorsten</p>
<br />
<p>On August 10th, 2010, 6:35 p.m., vandenoever wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://reviewboard.kde.orgrb/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 KOffice.</div>
<div>By vandenoever.</div>
<p style="color: grey;"><i>Updated 2010-08-10 18:35:05</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;">Switch from using QXmlReader to using QXmlStreamReader. This simple port \
gives a speedup of 5% on a document with a lot of text. Quite a few more \
optimizations are possible now by taking advantage of QStringRef.
</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;">TestXmlReader passes fine. </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>trunk/koffice/filters/libmsooxml/MsooXmlUtils.cpp <span style="color: \
grey">(1161556)</span></li>
<li>trunk/koffice/filters/liboofilter/ooutils.cc <span style="color: \
grey">(1161556)</span></li>
<li>trunk/koffice/libs/odf/KoOdfReadStore.h <span style="color: \
grey">(1161556)</span></li>
<li>trunk/koffice/libs/odf/KoOdfReadStore.cpp <span style="color: \
grey">(1161556)</span></li>
<li>trunk/koffice/libs/odf/KoXmlReader.h <span style="color: \
grey">(1161556)</span></li>
<li>trunk/koffice/libs/odf/KoXmlReader.cpp <span style="color: \
grey">(1161556)</span></li>
<li>trunk/koffice/libs/odf/tests/TestXmlReader.cpp <span style="color: \
grey">(1161556)</span></li>
</ul>
<p><a href="http://reviewboard.kde.org/r/4967/diff/" style="margin-left: 3em;">View \
Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic