On 01:27 pm, m...@egenix.com wrote:
exar...@twistedmatrix.com wrote:
On 12:21 pm, m...@egenix.com wrote:
See Zope for an example of how well this simply mechanism works out
in
practice: it simply scans the "Products" namespace for sub-packages
and
then loads each sub-package it finds to have it register itself with
Zope.
This is also roughly how Twisted's plugin system works. One drawback,
though, is that it means potentially executing a large amount of
Python
in order to load plugins. This can build up to a significant
performance issue as more and more plugins are installed.
I'd say that it's up to the application to deal with this problem.
An application which requires lots and lots of plugins could
define a registration protocol that does not require loading
all plugins at scanning time.
It's not fixable at the application level, at least in Twisted's plugin
system. It sounds like Zope's system has the same problem, but all I
know of that system is what you wrote above. The cost increases with
the number of plugins installed on the system, not the number of plugins
the application wants to load.
Jean-Paul
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com