<div dir="ltr"><div>Hi<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 26, 2023 at 11:30 PM afernandez via QGIS-Developer <<a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</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"><div><div>
<div id="m_-6129067434502316114compose-body-wrapper" dir="auto"><div dir="auto"><div dir="auto">Hello,</div><div dir="auto">One of my project would greatly
benefit from a much faster rendering. After some testing, the bulk
(>99%) of the time is spent at rendering the layer with
QgsRasterLayer(...,...). What I have also noticed is that rendering time
does not change with the number of cores, which suggests that the renderer
might be using a single thread. I checked the API documentation but
couldn't find anything about multithreading or some other procedure to
accelerate rendering. I was wondering if anyone has any suggestion or has
faced a similar difficulty. </div></div></div></div></div></blockquote></div><div class="gmail_quote"><br></div><div class="gmail_quote">Multi-threaded rendering is done at the granularity of whole map layers, so a single layer is rendered by a single CPU core. Therefore if you have just one layer that is slow to render, the multi-threading is not going to help. It is best to do some testing how you can improve the layer's rendering - for example, it could be that you are using some sub-optimal raster format, or there are overviews missing, or something else... one would need more details.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Regards</div><div class="gmail_quote">Martin</div><div class="gmail_quote"><br></div></div>