<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 7/30/2022 6:36 PM, Greg Troxel via
Qgis-user wrote:<br>
</div>
<blockquote type="cite" cite="mid:rmiedy2azj1.fsf@s1.lexort.com">
<div class="moz-text-plain" wrap="true" graphical-quote="true"
style="font-family: -moz-fixed; font-size: 13px;"
lang="x-unicode">
<pre class="moz-quote-pre" wrap="">I do understand that threads could help parallelization, eitehr using
multiple cores, or just allowing IO in parallel.
chris hermansen <a class="moz-txt-link-rfc2396E" href="mailto:clhermansen@gmail.com" moz-do-not-send="true"><clhermansen@gmail.com></a> writes:
</pre>
<blockquote type="cite" style="color: #007cff;">
<pre class="moz-quote-pre" wrap="">Does it seem like you have one thread per layer for reading plus one for
rendering plus one for user input?
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">I don't know how many layers I have <span class="moz-smiley-s1" title=":-)"><span>:-)</span></span> I can experiment with some
smaller projects.
When I noticed this, I had not tried to use qgis in at least a day.
</pre>
</div>
</blockquote>
I did a little bit of quick experimentation using Qgis 3.26 (Buenos
Aires) on Windows 10. The number of threads is all over the place.
It does not seem to be tied to the number of layers in the map, at
least in the sense of steady state (ie, let the app sit idle for a
while). Adding layers bumps the thread count, with shapefiles adding
more threads than files in a geopkg. Locally stored geotiffs are
more like a geopkg vector file in terms of threads. But once things
settle down I end up around 20 threads. Interestingly,
Help->About bumped the thread count by 8. Closing a project (not
saving) and then opening a "new" project (no template) bumped
another 8 threads for about 30 seconds, then settled back
down.Launching Qgis peaked at 30 threads, then after about it minute
settles down to 14. I suspect this is dependent on which plug-ins
I'm running. <br>
<br>
Note these numbers are non-deterministic - Help->About on a fresh
start of Qgis with an empty project jumped from 13 threads to 33,
then settled down to 22, which is different from the previous
attempt where there were open layers in the map.<br>
<br>
I'll be interested to hear what drives the thread count to > 150
. None of my very limited test involved database connections or
connections to remote data. Those might have something to do with
it. Maybe layer filters? Complex rendering (eg, geometry
generators)?<br>
</body>
</html>