<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/120815/">https://git.reviewboard.kde.org/r/120815/</a>
     </td>
    </tr>
   </table>
   <br />



 <p>Ship it!</p>











<p>- Christian David</p>


<br />
<p>On November 7th, 2014, 8:06 nachm. CET, Cristian OneČ› wrote:</p>









<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for KMymoney, Skrooge and Thomas Baumgart.</div>
<div>By Cristian OneČ›.</div>


<p style="color: grey;"><i>Updated Nov. 7, 2014, 8:06 nachm.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
alkimia
</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Before this the biggest cost of using an AlkValue object, implicitly
a KMyMoneyMoney object was assignment, construction and destruction.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">By using implicit sharing combined with a shared zero value, copying
on assignment and construction can be greatly reduced.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Implicit sharing was easy to implement using QSharedDataPointer.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Bumped the library version because API changes were necessary. The
mpq_class &valueRef() const method was bad beacause it was returning
a non-const reference from a const function. Now There is a const
version which will not detach the shared data while the non-const
version will detach from the shared data.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">REVIEW: 120815
REVIEW: 121030</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Succesfully ran KMyMoney and KMyMoney tests. See the attached screeshots for the callgrind data about AlkValue obtained while loading the same KMyMoney file without and with this change. Note that the second run also contains some MyMoneyMoney optimizations based on this feature (subject of a different review request).</p></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>libalkimia/CMakeLists.txt <span style="color: grey">(3dbe4db2d1d4ce6d324f7df947e3f284a40b492a)</span></li>

 <li>libalkimia/alkvalue.h <span style="color: grey">(7c02403adc641d1acf44c65fec39c1435e54405b)</span></li>

 <li>libalkimia/alkvalue.cpp <span style="color: grey">(ae5d3a4ba61c4f0100d2598660ae76c432914d90)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/120815/diff/" style="margin-left: 3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>


 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/10/26/f79cfa4b-b01a-4d14-adbe-dc905ad1a4c9__alk-value.png">Callgrind data using AlkValue from alkimia 4.3.2</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/10/26/ceb1cb24-fe5e-414e-a0c1-09746bcb9bcc__alk-value-implicitly-shared.png">Callgrind data using AlkValue from alkimia 4.4.0 (with implicit sharing)</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/10/26/9d142707-962b-434a-b847-8af7154ff4a1__alk-value-4.3.2.png">Callgrind data while loading file by KMyMoney using review 120818 and alkimia 4.3.2</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/10/26/25200104-be0e-434e-941d-c7c51c9bcb2c__register-load-4.3.2.png">Callgrind data while loading register by KMyMoney using review 120818 and alkimia 4.3.2</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/10/26/58ee7a28-2723-4b2c-9818-e82b0b6a03e8__register-load-4.4.0.png">Callgrind data while loading register by KMyMoney using review 120818 and alkimia 4.4.0</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/10/26/6f25d85b-3c3e-4d92-9f1a-1315daf3788c__transaction-edit-4.3.2.png">Callgrind data while editing transaction by KMyMoney using review 120818 and alkimia 4.3.2</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/10/26/e4d5d50f-efb8-4f0b-bed8-23fa1c5db391__transaction-edit-4.4.0.png">Callgrind data while editing transaction by KMyMoney using review 120818 and alkimia 4.4.0</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/10/26/8808ebc3-a112-4425-b35e-05acd8ba94d1__alk-value-4.4.0.png">Callgrind data while loading file by KMyMoney using review 120818 and alkimia 4.4.0</a></li>

</ul>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>