Measuring loading time of each layer when opening a QGIS workspace

30 views
Skip to first unread message

juanb...@gmail.com

unread,
Oct 14, 2021, 11:16:45 PM10/14/21
to QGIS Australia User Group
Hello Everyone, 

I often find myself working with QGIS workspaces that load too many layers in large projects at my company.  I'm talking about a mix of raster and vector layers, some with small file size, some very large file size.  Most of them are stored and read from a central server, and a few of them are read from my local PC or shared computers in my office network.  

Some of the PCs where the data is stored respond fast, some take longer time to deliver the data. 

Over time, as more layers are added, the loading time of the workspace gets slower and slower.  Removing layers from the workspace sounds easy, but it's not that easy in real life - it feels like I need them all at hand.  

I wish I could find if there are any particular offenders that take a long time to load in QGIS.  It could be because the file is large, or because they are stored in a slow PC.  The chances are that there's just a few layers that take a long time to load, and removing those ones could greatly improve the loading time of the workspace. 

That could be easily accomplished if there was a way to record the loading time of each layer when a QGIS workspace is opened - has anyone found a way to do that?  Ideally, a script or plugin that writes a *.txt or *.csv file with the name of each layer loaded and the time in seconds it took to load it. 

The closest answers I've found on the internet are these ones below.  They are close to what I'm trying to do but I think they don't work in my particular scenario.  

https://gis.stackexchange.com/questions/285855/measuring-loading-times-in-qgis-using-pyqgis


Thanks for your help
Juan

juanb...@gmail.com

unread,
Nov 1, 2021, 10:41:05 PM11/1/21
to QGIS Australia User Group
If anyone ever bumps into the same problem, I got a solution from German Carrillo in this post: 

Reply all
Reply to author
Forward
0 new messages