<div dir="ltr">Correct. QgsRuntimeProfiler is the tool that can do it.  <div><br></div><div><a href="https://qgis.org/api/classQgsRuntimeProfiler.html">https://qgis.org/api/classQgsRuntimeProfiler.html</a>  <br></div><div><br></div><div>In Python you can access it using this:<div><br></div><div> QgsApplication.instance().profiler()<br></div><div><br></div><div>An example:</div><div><br></div><div>   QgsApplication.instance().profiler().start("my_thing")</div><div># long expensive stuff</div><div> 

   QgsApplication.instance().profiler().end()<br></div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 23, 2020 at 9:38 PM Richard Duivenvoorde <<a href="mailto:rdmailings@duif.net">rdmailings@duif.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 5/23/20 11:42 AM, Sebastian M. Ernst wrote:<br>
<br>
> @Richard How does your Citrix setup / architecture look like<br>
> (approximately)?<br>
<br>
I'll ask around for more details, as I'm there just as a user of that setup.<br>
<br>
But I did try a lot of things: and exactly what you tell: their virus<br>
scanner was pushing some hash version of all python files to some online<br>
service. So I disabled it...<br>
But still... And off course they are working with some network shares,<br>
so I will try out some of your other idea's<br>
<br>
> @Nathan & @Nyall Where in QGIS' source can I find the profiling tool? I<br>
> just searched and could not locate it ... Would you consider adding<br>
> support for a Python profiler to it, e.g. [1], [2] or [3]? The relevant<br>
> code could (conditionally) be injected somewhere around here [4] or here<br>
> [5]. I have played with this idea a while ago. It works in principle,<br>
> but a proper integration into your GUI would be great ...<br>
<br>
In my debug build, using<br>
export QGIS_DEBUG=5<br>
<br>
I see:<br>
<br>
../src/core/symbology/qgssymbollayerutils.cpp:3936 :<br>
(svgSymbolNameToPath) [0ms] Svg found in alternative path<br>
../src/core/qgsruntimeprofiler.cpp:80 : (end) [0ms] PROFILE: Load<br>
default style database/Load symbols/topo camp - 0.001<br>
../src/core/qgsruntimeprofiler.cpp:80 : (end) [0ms] PROFILE: Load<br>
default style database/Load symbols/topo foot - 0<br>
../src/core/qgsruntimeprofiler.cpp:80 : (end) [0ms] PROFILE: Load<br>
default style database/Load symbols/topo forest - 0<br>
<br>
So:<br>
<a href="https://github.com/qgis/QGIS/blob/master/src/core/qgsruntimeprofiler.cpp" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS/blob/master/src/core/qgsruntimeprofiler.cpp</a> :-)<br>
<br>
Regards,<br>
<br>
Richard Duivenvoorde<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div>