On 01:27 pm, mal@egenix.com wrote:exarkun@twistedmatrix.com wrote:On 12:21 pm, mal@egenix.com wrote:See Zope for an example of how well this simply mechanism works out inpractice: it simply scans the "Products" namespace for sub-packages andthen loads each sub-package it finds to have it register itself withZope.This is also roughly how Twisted's plugin system works. One drawback,though, is that it means potentially executing a large amount of Pythonin order to load plugins. This can build up to a significantperformance 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 coulddefine a registration protocol that does not require loadingall 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.