<div dir="ltr">Hi Martin,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 19, 2016 at 10:52 AM, Martin Dobias <span dir="ltr"><<a href="mailto:wonder.sk@gmail.com" target="_blank">wonder.sk@gmail.com</a>></span> wrote:<span class=""></span><br><span class=""></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
</span>Just curious - what did you use for profiling? Release or Debug build?<span class=""><br></span></blockquote><div><br></div><div>When trying to optimize code like QGIS server, I tend to do that:<br><ol><li>Take a scenario that matches the realworld, run it with a RELEASE build on a machine matching somehow what is the usual production machine, then:</li><ol><li>do a warmup round to make sure the stuff as reached cruise speed and throw away the measurements.</li><li>measuring global real times for several queries (2 minutes full speed) and look at the average response time and the distribution.<br></li></ol><li>I did the same measurements for other servers (MapServer and GeoServer), just for reference.<br></li><li>When that is done, and only when that is done, I take a single query, that I run against QGIS compiled in DEBUG (to have symbols and to be able to follow what's happening) and run it under valgrind (callgrind mode).</li><li>Then, after identifying trouble zones, I change the code and run step 1 to see if there is any change. Keep the change if the improvement is measurable worth the added complexity.</li><li>Repeat step 3 until you run out of budget and/or the improvements are becoming too small to be measured.<br></li></ol></div><div>So yes, my per function numbers are not very accurate, but they are a very good indication of where time is spent. But, I still have the global numbers with a RELEASE build to see if changes are improving things.<br></div><div> <span class=""></span><br><span class=""></span></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
</span>Sounds quite interesting - would be good to get some numbers how much<br>
this would help.<br></blockquote><div><br></div><div>My plan is to find some time to do that. It shouldn't take too much time.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yes, but obviously the results from profiling vary quite a lot<br>
depending on provider type and used symbology.<br></blockquote><div><br></div><div>The provider, at least PostGIS on the same machine, is not contributing too much on the time spent to do a simple GetMap, from what I've seen. But yes, when optimizing, you have to choose a scenario and it impacts a lot what you see.<br></div><br></div>Thanks for the history lesson. It's always interesting to understand from where a code comes from.<br><br></div><div class="gmail_extra">CU<br></div></div></div>