From e7a6d1055574d2dd892f414dbe993ee5782ab488 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Thu, 3 Nov 2011 06:42:17 -0400 Subject: Finalize plugin initialization on demand. This patch changes the way plugins are initialized. Instead of finalizing all the plugins at once, plugins are finalized only after they are accessed (currently applies to Command, Object and Attribute subclasses, only in CLI by default). This change provides significant performance boost, as only the plugins that are actually used are finalized. ticket 1336 --- ipalib/config.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ipalib/config.py') diff --git a/ipalib/config.py b/ipalib/config.py index 410e5f0b..5e3ef8d9 100644 --- a/ipalib/config.py +++ b/ipalib/config.py @@ -492,6 +492,10 @@ class Env(object): if 'conf_default' not in self: self.conf_default = self._join('confdir', 'default.conf') + # Set plugins_on_demand: + if 'plugins_on_demand' not in self: + self.plugins_on_demand = (self.context == 'cli') + def _finalize_core(self, **defaults): """ Complete initialization of standard IPA environment. -- cgit