<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/123239/">https://git.reviewboard.kde.org/r/123239/</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 19th, 2015, 6:01 a.m. UTC, <b>Dennis Nienhüser</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="https://git.reviewboard.kde.org/r/123239/diff/1/?file=359917#file359917line378" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/marble/ViewportParams.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 ViewportParams::resolves ( const GeoDataCoordinates &coord1,</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">378</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">return</span> <span class="p">(</span> <span class="n">fabs</span><span class="p">(</span> <span class="n">lon2</span> <span class="o">-</span> <span class="n">lon1</span> <span class="p">)</span> <span class="o">+</span> <span class="n">fabs</span><span class="p">(</span> <span class="n">lat2</span> <span class="o">-</span> <span class="n">lat1</span> <span class="p">)</span> <span class="o"><span class="hl"><</span></span> <span class="n">angularResolution</span><span class="p">()</span> <span class="p">);</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">378</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">return</span> <span class="p">(</span> <span class="n">fabs</span><span class="p">(</span> <span class="n">lon2</span> <span class="o">-</span> <span class="n">lon1</span> <span class="p">)</span> <span class="o">+</span> <span class="n">fabs</span><span class="p">(</span> <span class="n">lat2</span> <span class="o">-</span> <span class="n">lat1</span> <span class="p">)</span> <span class="o"><span class="hl">></span></span> <span class="n">angularResolution</span><span class="p">()</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">did you catch all usage of this function? It's a public method, I wonder if that subtly introduces bugs in 3rd party stuff if we don't rename it at the same time.</p></pre>
 </blockquote>



 <p>On July 19th, 2015, 4:05 p.m. UTC, <b>Torsten Rahn</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Yes it's used only in one place. The semantic is backwards.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Ah, now I see the catch, we have three overloads of resolve(). Go ahead, makes sense.</p></pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 19th, 2015, 6:01 a.m. UTC, <b>Dennis Nienhüser</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="https://git.reviewboard.kde.org/r/123239/diff/1/?file=359920#file359920line138" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/marble/geodata/data/GeoDataLineString.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

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



 
 

 <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">138</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">if</span> <span class="p">(</span><span class="n">resolution</span> <span class="o"><</span> <span class="mf">0.0000005</span><span class="p">)</span> <span class="n">m_level</span> <span class="o">=</span> <span class="mi">17</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">What's the reason not to use a function here? Is it supposed to be faster, more readable, or to allow fine-tuning of values?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">What about using a QMap<int,double> instead and calling lowerBound() to return the level? That is as readable and fine-tunable and faster wrt. computational complexity (for large input sizes at least which arguably is not the case here)</p></pre>
 </blockquote>



 <p>On July 19th, 2015, 4:05 p.m. UTC, <b>Torsten Rahn</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The reason not to use a function here is that this makes it easier to tweak and fine-tune single values based on trial and error testing on the screen. Using a function this would become harder to understand and would be less transparent.
Yes, using QMap could be a possible alternative - and in this case it would certainly be a bit slower for most cases - no idea whether it would be more readable.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Ok, fine.</p></pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 19th, 2015, 6:01 a.m. UTC, <b>Dennis Nienhüser</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="https://git.reviewboard.kde.org/r/123239/diff/1/?file=359922#file359922line51" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/marble/projections/AbstractProjection.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; ">AbstractProjection::~AbstractProjection()</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">51</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">int</span> <span class="n">AbstractProjectionPrivate</span><span class="o">::</span><span class="n">levelForResolution</span><span class="p">(</span><span class="n">qreal</span> <span class="n">resolution</span><span class="p">)</span> <span class="k">const</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">why not share with geodatalinestringprivate somehow?</p></pre>
 </blockquote>



 <p>On July 19th, 2015, 4:05 p.m. UTC, <b>Torsten Rahn</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I thought about it. But I'd like to keep this stuff still in private classes. Also putting it into GeoDataLineString would require to make this method static. So the current solution seems to be more appropriate.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">What about having a comment on top of each pointing to the other? I'd like to avoid them going out of sync.</p></pre>
<br />




<p>- Dennis</p>


<br />
<p>On April 3rd, 2015, 1:34 p.m. UTC, Torsten Rahn 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 Marble, Bernhard Beschow, Dennis Nienhüser, Marius Stanciu, and Thibaut Gridel.</div>
<div>By Torsten Rahn.</div>


<p style="color: grey;"><i>Updated April 3, 2015, 1:34 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
marble
</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;">Allow for automatically assigning detail values to the nodes inside a linestring.
This mechanism is used for PN2 parsing in this patch.
Taking the detail level into account this approach improves geometry layer performance by 20% on my i7 based machine.
This patch also fixes the "backwards" semantical meaning of ViewportParams::resolve()
In the next step this optimization could also be applied during KML and OSM parsing.</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;">Tested manually using the Atlas map, Plain map and Political map without apparent regressions. "make test" runs fine.
Checked the geometry layer values by starting Marble with --runtimeTrace. On average the msec values are about 20% lower on my machine (and I hope that improvement is even better on slower CPUs).
Ideas for unit tests regarding this patch are welcome. ;-)</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>src/lib/marble/ViewportParams.cpp <span style="color: grey">(bca8ea9)</span></li>

 <li>src/lib/marble/geodata/data/GeoDataCoordinates.h <span style="color: grey">(610b423)</span></li>

 <li>src/lib/marble/geodata/data/GeoDataLineString.h <span style="color: grey">(4e4e3da)</span></li>

 <li>src/lib/marble/geodata/data/GeoDataLineString.cpp <span style="color: grey">(8864518)</span></li>

 <li>src/lib/marble/geodata/data/GeoDataLineString_p.h <span style="color: grey">(2c7b9ec)</span></li>

 <li>src/lib/marble/projections/AbstractProjection.cpp <span style="color: grey">(591adc0)</span></li>

 <li>src/lib/marble/projections/AbstractProjection_p.h <span style="color: grey">(7bbfcb5)</span></li>

 <li>src/lib/marble/projections/AzimuthalProjection.cpp <span style="color: grey">(d6e7376)</span></li>

 <li>src/lib/marble/projections/CylindricalProjection.cpp <span style="color: grey">(42345ab)</span></li>

 <li>src/plugins/runner/pn2/Pn2Runner.cpp <span style="color: grey">(fd363c8)</span></li>

</ul>

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






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







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