[QGIS-Developer] Memory Leak / Slowdown?

Matthias matthias at opengis.ch
Mon Apr 20 06:39:33 PDT 2020


Hi Peter,  
  
It's possible that a part of the cleanup only happens on the next event loop run.  
  
Questions / things to try:  
  
- Do you really need to add them to the project or is a layer without adding it to the project good enough for your purpose?  
- Can you run this in batches of ~100 (or even 1) each and then trigger the next batch on a new event loop invocation, e.g. by using QTimer.singleShot()  
- The easiest thing would be calling QgsApplication.processEvents(), but be warned that using this is known for introducing instabilities, depending on the context in which it is called  
  
Matthias  
  
  
  



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200420/230c0781/attachment.html>


More information about the QGIS-Developer mailing list