Skip to content
Permalink
Browse files

[Plugin manager] [needs-doc] Don't preload plugins for a test if they…

… are broken. That function slowed down QGIS startup
  • Loading branch information
borysiasty committed Nov 4, 2017
1 parent edcaf05 commit cfec339c303585aa522382c3d83b01c84802160c
Showing with 8 additions and 5 deletions.
  1. +2 −2 python/pyplugin_installer/installer.py
  2. +6 −3 python/pyplugin_installer/installer_data.py
@@ -307,7 +307,7 @@ def installPlugin(self, key, quiet=False):
updateAvailablePlugins()
# try to load the plugin
loadPlugin(plugin["id"])
plugins.getAllInstalled(testLoad=True)
plugins.getAllInstalled()
plugins.rebuild()
plugin = plugins.all()[key]
if not plugin["error"]:
@@ -565,7 +565,7 @@ def installFromZipFile(self, filePath):
if infoString is None:
updateAvailablePlugins()
loadPlugin(pluginName)
plugins.getAllInstalled(testLoad=True)
plugins.getAllInstalled()
plugins.rebuild()

if settings.contains('/PythonPlugins/' + pluginName):
@@ -548,7 +548,7 @@ def removeRepository(self, repo):
del self.repoCache[repo]

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

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

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

0 comments on commit cfec339

Please sign in to comment.
You can’t perform that action at this time.