25

We have new users of QGIS in our office that are dismayed immediately by the startup time of QGIS - which hangs on the 'Restoring Loaded Plugins' message on the splash screen.

Is there a way to tell which plugins take long to load and are causing QGIS to load slowly? This can sometimes take ~1minute!

The only solution so far is to disable almost every plugin that comes with the default installation and bring back the plugins one by one as you need them - but so far we haven't figured out which default plugin is causing the slow load time.

DPSSpatial_BoycottingGISSE
  • 18,790
  • 4
  • 66
  • 110

1 Answers1

37

Hidden feature that I never made a UI for

import pprint
pprint.pprint(qgis.utils.plugin_times)

Run it in the Python console

Also see the plugin called Plugin Load Times: (https://gitlab.com/GIS-projects/Plugin-Load-Times)

Michel Stuyts
  • 2,095
  • 16
  • 16
Nathan W
  • 34,706
  • 5
  • 97
  • 148
  • 6
    +1, would love to see a button for this somewhere in the UI of Manage and Install Plugins... > Settings :) – Joseph Sep 01 '16 at 15:08
  • 3
    @Nathan W: I wanted to sort the results, so i gave it a try: https://gist.github.com/neogis-de/3dfa66180c3506cb0d87f40895ba36c0 – Thomas B Sep 01 '16 at 20:37
  • 2
    In 2.16 there is also a runtime profiler class which which times other parts of the code, mainly the load times. I will look at making a report interface for them all. – Nathan W Sep 01 '16 at 23:38
  • A timely answer to a question that has been bugging me too. Perhaps a gui for it is now timely? – Johanna Sep 06 '16 at 22:30
  • I wonder if there is also a way to measure how long each layer takes to load? – Thomas B Sep 30 '16 at 05:55
  • I made a standalone tool for that but could be ported as a plugin to break down load times easy enough – Nathan W Sep 30 '16 at 10:05
  • @Nathan W :Is your standalone tool somewhere on github to give it a try? – Thomas B Oct 04 '16 at 08:57
  • https://github.com/DMS-Aus/qgis2img – Nathan W Oct 05 '16 at 04:54
  • @Nathan W I tried qgis2img but the benchmark seems to be a bit 'optimistic'. Loading time in QGIS is about 1:05min and in qgis2img for project and layers together 24,6 seconds. Any idea why there is such a difference? – Thomas B Oct 06 '16 at 12:26
  • @Nathan and perhaps add a plugin loading time total? – Techie_Gus Mar 03 '17 at 11:10
  • I run QGIS 3.6 on 2 laptops and one desktop. The desktop takes a very long time to load. I do notice that after restart it is better. – Cary H Jul 24 '19 at 11:44