stable

Clone or download

Read-only

request #12475 [Perf] cache hooks and plugins in a more aggressive manner

Let's start with some data, compare to master on empty.php - Wall time: 34.9 ms -> 21.6 ms (-38%) - Memory: 9.23 MB -> 7.28 MB (-21%) - SQL queries: 8 -> 7 It saves a lot of time because there are far less class to instantiate, enhance autoloads to kick. On other, Burning Parrot pages, the pre.php part seem down to ~8.5ms and we can see a 13% perf gain. You need to activate it by setting in local.inc $plugin_hooks_cache_type = 'serialized'; Change-Id: I168361078590cf913ea139bb3200a515e781d3be

Modified Files

Name
M Makefile +5 −0 Go to diff View file
A plugins/crosstracker/tests/rest/CrossTrackerDataBuilder.php +67 −0 Go to diff View file
A plugins/crosstracker/tests/rest/init_test_data.php +25 −0 Go to diff View file
M plugins/git/bin/convert_gitolite_full_logs.php +1 −0 Go to diff View file
M plugins/pullrequest/tests/rest/DatabaseInitialization.class.php +2 −0 Go to diff View file
M plugins/svn/bin/migrate_to_plugin.php +1 −0 Go to diff View file
M plugins/svn/bin/pre-revprop-change.php +3 −2 Go to diff View file
M plugins/svn/bin/svn_post_commit.php +3 −1 Go to diff View file
M plugins/svn/bin/svn_pre_commit.php +3 −2 Go to diff View file
M src/common/collection/Map.class.php +1 −1 Go to diff View file
M src/common/event/EventManager.class.php +21 −5 Go to diff View file
M src/common/include/SiteCache.php +1 −12 Go to diff View file
A src/common/plugin/EventPluginCache.php +49 −0 Go to diff View file
A src/common/plugin/EventPluginCacheInfo.php +49 −0 Go to diff View file
M src/common/plugin/Plugin.class.php +4 −1 Go to diff View file
A src/common/plugin/PluginCacheInfo.php +45 −0 Go to diff View file
M src/common/plugin/PluginFactory.class.php +1 −1 Go to diff View file
A src/common/plugin/PluginLoader.php +128 −0 Go to diff View file
M src/common/plugin/PluginManager.class.php +35 −8 Go to diff View file
A src/common/plugin/SerializedPluginProxy.php +115 −0 Go to diff View file
A tests/phpunit/common/event/EventManagerTest.php +46 −0 Go to diff View file
M tests/rest/bin/init_data.php +0 −1 Go to diff View file
M tests/rest/lib/TestDataBuilder.php +3 −35 Go to diff View file
M tests/simpletest/common/plugin/PluginManagerTest.php +97 −4 Go to diff View file
A tests/simpletest/common/plugin/_fixtures/DatAnotherPlugin.php +57 −0 Go to diff View file
M tests/simpletest/common/plugin/_fixtures/DatPlugin.php +18 −4 Go to diff View file