Skip to content

Commit cfec339

Browse files
committed
[Plugin manager] [needs-doc] Don't preload plugins for a test if they are broken. That function slowed down QGIS startup
1 parent edcaf05 commit cfec339

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

python/pyplugin_installer/installer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def installPlugin(self, key, quiet=False):
307307
updateAvailablePlugins()
308308
# try to load the plugin
309309
loadPlugin(plugin["id"])
310-
plugins.getAllInstalled(testLoad=True)
310+
plugins.getAllInstalled()
311311
plugins.rebuild()
312312
plugin = plugins.all()[key]
313313
if not plugin["error"]:
@@ -565,7 +565,7 @@ def installFromZipFile(self, filePath):
565565
if infoString is None:
566566
updateAvailablePlugins()
567567
loadPlugin(pluginName)
568-
plugins.getAllInstalled(testLoad=True)
568+
plugins.getAllInstalled()
569569
plugins.rebuild()
570570

571571
if settings.contains('/PythonPlugins/' + pluginName):

python/pyplugin_installer/installer_data.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ def removeRepository(self, repo):
548548
del self.repoCache[repo]
549549

550550
# ----------------------------------------- #
551-
def getInstalledPlugin(self, key, path, readOnly, testLoad=True):
551+
def getInstalledPlugin(self, key, path, readOnly, testLoad=False):
552552
""" get the metadata of an installed plugin """
553553
def metadataParser(fct):
554554
""" plugin metadata parser reimplemented from qgis.utils
@@ -683,8 +683,11 @@ def pluginMetadata(fct):
683683
return plugin
684684

685685
# ----------------------------------------- #
686-
def getAllInstalled(self, testLoad=True):
687-
""" Build the localCache """
686+
def getAllInstalled(self, testLoad=False):
687+
""" Build the localCache
688+
Note: Currently testLoad is always disabled in order to speed up QGIS startup.
689+
The related code will be probably removed.
690+
"""
688691
self.localCache = {}
689692

690693
# reversed list of the plugin paths: first system plugins -> then user plugins -> finally custom path(s)

0 commit comments

Comments
 (0)