stable
Clone or download
Read-only
request #8363: performance improvements on plugin loading
At each hit there is a mandatory pass to be able to plug additionnal behaviour with Plugin mecanism. However this mecanism is very time consuming with current implementation. This commit change the way plugins are loaded: - get rid of hook priorities: php implementation of prioritized multi map is slow and priorities are not used - instanciate plugins only when needed (at processEvent time) - cache plugin / hook association (from one request to another, there is no changes in hook structure so no need to recompute everytime Change-Id: Ib270df8272a84d4a8305da1575eca6beef245df6
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/git/tests/rest/GitDataBuilder.php | +1 | −7 | Go to diff View file |
M | src/common/autoload.php | +3 | −4 | Go to diff View file |
D | src/common/collection/MultiMap.class.php | +0 | −82 | Go to diff View file |
D | src/common/collection/PrioritizedMultiMap.class.php | +0 | −43 | Go to diff View file |
M | src/common/event/EventManager.class.php | +18 | −26 | Go to diff View file |
M | src/common/include/SiteCache.php | +19 | −0 | Go to diff View file |
M | src/common/language/BaseLanguage.class.php | +1 | −1 | Go to diff View file |
M | src/common/plugin/PluginFactory.class.php | +24 | −3 | Go to diff View file |
M | src/common/plugin/PluginManager.class.php | +135 | −102 | Go to diff View file |
A | src/common/plugin/PluginProxy.php | +72 | −0 | Go to diff View file |
M | src/common/system_event/SystemEventProcessor_Root.class.php | +11 | −1 | Go to diff View file |
M | src/utils/process_system_events.php | +2 | −1 | Go to diff View file |
M | tests/lib/rest/TestDataBuilder.php | +1 | −0 | Go to diff View file |
M | tests/lib/soap/TestDataBuilder.php | +1 | −0 | Go to diff View file |
D | tests/simpletest/common/collection/MultiMapTest.php | +0 | −26 | Go to diff View file |
D | tests/simpletest/common/collection/MultiMapTestCase.class.php | +0 | −72 | Go to diff View file |
D | tests/simpletest/common/collection/PrioritizedMultiMapTest.php | +0 | −43 | Go to diff View file |
M | tests/simpletest/common/event/EventManagerTest.php | +9 | −54 | Go to diff View file |
M | tests/simpletest/common/plugin/PluginManagerTest.php | +83 | −131 | Go to diff View file |
A | tests/simpletest/common/plugin/PluginProxyTest.php | +77 | −0 | Go to diff View file |
A | tests/simpletest/common/plugin/_fixtures/DatPlugin.php | +24 | −0 | Go to diff View file |
A | tests/simpletest/common/plugin/_fixtures/NotLoaded.php | +5 | −0 | Go to diff View file |
M | tests/simpletest/common/system_event/SystemEventProcessor_RootTest.php | +9 | −1 | Go to diff View file |
M | tools/utils/admin/activate_plugin.php | +1 | −15 | Go to diff View file |