[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Review Request: Let KOffice use KoProgressUpdater when loading
From:       jos.van.den.oever () kogmbh ! com
Date:       2010-08-09 8:33:28
Message-ID: 20100809083328.24989.72889 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On 2010-08-09 07:23:26, vandenoever wrote:
> > trunk/koffice/libs/main/KoApplication.cpp, line 45
> > <http://reviewboard.kde.org/r/4906/diff/2/?file=32651#file32651line45>
> > 
> > Yes it could, but why would I do that?
> > Eventually, appStartTime should move to a private part of the KoUpdater or \
> > KoProgressUpdater class, so that applications that do not use KoApplication can \
> > also have good time stamps. 
> > Doing that would be done at the same time as refactoring KoUpdater to have \
> > recursive tasks.
> 
> Thomas Zander wrote:
> As a quick answer to 'why';  your code now sets the time on library load, moving it \
> would make it about starting the app. In cases where konq loads the kpart, or you \
> open a second document in the same process there is a significant difference.

Adding the code in namespace {} in the KoApplication compile unit or adding it to \
KoApplication::Private makes very little difference in the time, since these are \
loaded and initialized by the application when the library in which they are \
contained is loaded.

I do not see how I could add the QTime instance anywhere so that it is automatically \
initialized at application startup and I do not think it is a high priority. Mainly \
there needs to be some reference time and the time being slightly later than the \
application startup time for the common usecase is fine for most purposes.


- vandenoever


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4906/#review6888
-----------------------------------------------------------


On 2010-08-06 05:54:23, vandenoever wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/4906/
> -----------------------------------------------------------
> 
> (Updated 2010-08-06 05:54:23)
> 
> 
> Review request for KOffice.
> 
> 
> Summary
> -------
> 
> This patch changes the progress reporting in KOffice to use KoProgressUpdater. This \
> class now also logs the times needed for each task that is reported. All places \
> where currently progress was reported have been changed. (There were not so many.) \
> Only loading has been converted. When saving other mechanisms are uses. For saving \
> there is currently very little progress reporting done. This can be made more \
> finegrained later. 
> This patch lets KOffice write a file 'output.txt' when loading a file. I will \
> replace this by a more configurable way to log performance and make it optional. 
> 
> Diffs
> -----
> 
> trunk/koffice/kspread/Map.h 1159681 
> trunk/koffice/kspread/Map.cpp 1159681 
> trunk/koffice/kspread/Sheet.cpp 1159681 
> trunk/koffice/kspread/part/Doc.cpp 1159681 
> trunk/koffice/kword/part/KWDocument.cpp 1159681 
> trunk/koffice/kword/part/KWOdfLoader.cpp 1159681 
> trunk/koffice/libs/kopageapp/KoPADocument.cpp 1159681 
> trunk/koffice/libs/main/KoApplication.cpp 1159681 
> trunk/koffice/libs/main/KoDocument.h 1159681 
> trunk/koffice/libs/main/KoDocument.cpp 1159681 
> trunk/koffice/libs/main/KoFilter.h 1159681 
> trunk/koffice/libs/main/KoFilter.cpp 1159681 
> trunk/koffice/libs/main/KoFilterChainLink.h 1159681 
> trunk/koffice/libs/main/KoFilterChainLink.cpp 1159681 
> trunk/koffice/libs/main/KoFilterManager.h 1159681 
> trunk/koffice/libs/main/KoFilterManager.cpp 1159681 
> trunk/koffice/libs/main/KoFilterManager_p.h 1159681 
> trunk/koffice/libs/main/KoProgressUpdater.h 1159681 
> trunk/koffice/libs/main/KoProgressUpdater.cpp 1159681 
> trunk/koffice/libs/main/KoUpdater.cpp 1159681 
> trunk/koffice/libs/main/KoUpdaterPrivate_p.h 1159681 
> trunk/koffice/libs/odf/KoOdfDocument.cpp 1159681 
> 
> Diff: http://reviewboard.kde.org/r/4906/diff
> 
> 
> Testing
> -------
> 
> Test loading of some files. Progress bar worked fine, but is not updated while the \
> event loop is not updated. This can be easily fixed when the patch is accepted and \
> would be an improvement to the current situation. 
> 
> 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/4906/">http://reviewboard.kde.org/r/4906/</a>
  </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On August 9th, 2010, 7:23 a.m., <b>vandenoever</b> \
wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  



<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/4906/diff/2/?file=32651#file32651line45" style="color: black; font-weight: \
bold; text-decoration: underline;">trunk/koffice/libs/main/KoApplication.cpp</a>  \
<span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>  <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; ">namespace {</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">45</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="k">const</span> <span class="n">QTime</span> <span \
class="n">appStartTime</span><span class="p">(</span><span \
class="n">QTime</span><span class="o">::</span><span \
class="n">currentTime</span><span class="p">());</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes it could, but why \
would I do that? Eventually, appStartTime should move to a private part of the \
KoUpdater or KoProgressUpdater class, so that applications that do not use \
KoApplication can also have good time stamps.

Doing that would be done at the same time as refactoring KoUpdater to have recursive \
tasks.</pre>  </blockquote>



 <p>On August 9th, 2010, 7:30 a.m., <b>Thomas Zander</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;">As a quick answer to \
&#39;why&#39;;  your code now sets the time on library load, moving it would make it \
about starting the app. In cases where konq loads the kpart, or you open a second \
document in the same process there is a significant difference.</pre>  </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Adding the \
code in namespace {} in the KoApplication compile unit or adding it to \
KoApplication::Private makes very little difference in the time, since these are \
loaded and initialized by the application when the library in which they are \
contained is loaded.

I do not see how I could add the QTime instance anywhere so that it is automatically \
initialized at application startup and I do not think it is a high priority. Mainly \
there needs to be some reference time and the time being slightly later than the \
application startup time for the common usecase is fine for most purposes. </pre>
<br />




<p>- vandenoever</p>


<br />
<p>On August 6th, 2010, 5:54 a.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-06 05:54:23</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;">This patch changes the progress reporting in KOffice to use \
KoProgressUpdater. This class now also logs the times needed for each task that is \
reported. All places where currently progress was reported have been changed. (There \
were not so many.) Only loading has been converted. When saving other mechanisms are \
uses. For saving there is currently very little progress reporting done. This can be \
made more finegrained later.

This patch lets KOffice write a file &#39;output.txt&#39; when loading a file. I will \
replace this by a more configurable way to log performance and make it optional.

</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;">Test loading of some files. Progress bar worked fine, but is not updated \
while the event loop is not updated. This can be easily fixed when the patch is \
accepted and would be an improvement to the current situation.</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/kspread/Map.h <span style="color: grey">(1159681)</span></li>

 <li>trunk/koffice/kspread/Map.cpp <span style="color: grey">(1159681)</span></li>

 <li>trunk/koffice/kspread/Sheet.cpp <span style="color: grey">(1159681)</span></li>

 <li>trunk/koffice/kspread/part/Doc.cpp <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/kword/part/KWDocument.cpp <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/kword/part/KWOdfLoader.cpp <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/kopageapp/KoPADocument.cpp <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/main/KoApplication.cpp <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/main/KoDocument.h <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/main/KoDocument.cpp <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/main/KoFilter.h <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/main/KoFilter.cpp <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/main/KoFilterChainLink.h <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/main/KoFilterChainLink.cpp <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/main/KoFilterManager.h <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/main/KoFilterManager.cpp <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/main/KoFilterManager_p.h <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/main/KoProgressUpdater.h <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/main/KoProgressUpdater.cpp <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/main/KoUpdater.cpp <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/main/KoUpdaterPrivate_p.h <span style="color: \
grey">(1159681)</span></li>

 <li>trunk/koffice/libs/odf/KoOdfDocument.cpp <span style="color: \
grey">(1159681)</span></li>

</ul>

<p><a href="http://reviewboard.kde.org/r/4906/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