stable

Clone or download

Read-only

Front router should not rely on closure [intro]

Due to closures we cannot activate the cache bundled with FastRoute and it comes with two performance penalty: - routes must be recomputed for each and every requests - all plugins the declare routes (ie. almost all in a couple of months) are instanciated for nothing and it starts to be really visible. An empty (no plugins) Tuleap homepage takes less than 30ms to load (w/o stats or news) and the same page with 20 plugins takes 60ms to load due to all the autoloading of classes & all This commit introduce a new way to declare handler associated to routes for both core and plugins, it demonstrates how we should do it before applying on all plugins (and activate cache...) request #12833 Reduce events that need to load all plugins Change-Id: Ic5d857653534eebb09418e2f0852c2242f7747e5

Modified Files

Name
M plugins/git/include/gitPlugin.class.php +67 −55 Go to diff View file
M plugins/git/phpunit/GitRoutingTest.php +7 −4 Go to diff View file
M src/common/Request/FrontRouter.php +54 −29 Go to diff View file
M src/common/Request/RouteCollector.php +169 −92 Go to diff View file
M src/common/plugin/Plugin.class.php +8 −0 Go to diff View file
M src/www/index.php +2 −1 Go to diff View file
M tests/phpunit/common/Request/FrontRouterTest.php +44 −2 Go to diff View file