@@ -54,9 +54,9 @@ public function __construct(
5454 protected LoggerInterface $ logger ,
5555 IRequest $ request ,
5656 private IConfig $ config ,
57- private IEventLogger $ eventLogger ,
57+ protected IEventLogger $ eventLogger ,
5858 private ContainerInterface $ container ,
59- private IAppManager $ appManager ,
59+ protected IAppManager $ appManager ,
6060 ) {
6161 $ baseUrl = \OC ::$ WEBROOT ;
6262 if (!($ config ->getSystemValue ('htaccess.IgnoreFrontController ' , false ) === true || getenv ('front_controller_active ' ) === 'true ' )) {
@@ -116,9 +116,11 @@ public function loadRoutes($app = null) {
116116 $ this ->loaded = true ;
117117 $ routingFiles = $ this ->getRoutingFiles ();
118118
119+ $ this ->eventLogger ->start ('route:load:attributes ' , 'Loading Routes from attributes ' );
119120 foreach (\OC_App::getEnabledApps () as $ enabledApp ) {
120121 $ this ->loadAttributeRoutes ($ enabledApp );
121122 }
123+ $ this ->eventLogger ->end ('route:load:attributes ' );
122124 } else {
123125 if (isset ($ this ->loadedApps [$ app ])) {
124126 return ;
@@ -140,6 +142,7 @@ public function loadRoutes($app = null) {
140142 }
141143 }
142144
145+ $ this ->eventLogger ->start ('route:load:files ' , 'Loading Routes from files ' );
143146 foreach ($ routingFiles as $ app => $ file ) {
144147 if (!isset ($ this ->loadedApps [$ app ])) {
145148 if (!$ this ->appManager ->isAppLoaded ($ app )) {
@@ -160,6 +163,7 @@ public function loadRoutes($app = null) {
160163 $ this ->root ->addCollection ($ collection );
161164 }
162165 }
166+ $ this ->eventLogger ->end ('route:load:files ' );
163167
164168 if (!isset ($ this ->loadedApps ['core ' ])) {
165169 $ this ->loadedApps ['core ' ] = true ;
@@ -265,6 +269,7 @@ public function findMatchingRoute(string $url): array {
265269 $ this ->loadRoutes ();
266270 }
267271
272+ $ this ->eventLogger ->start ('route:url:match ' , 'Symfony url matcher call ' );
268273 $ matcher = new UrlMatcher ($ this ->root , $ this ->context );
269274 try {
270275 $ parameters = $ matcher ->match ($ url );
@@ -283,6 +288,7 @@ public function findMatchingRoute(string $url): array {
283288 throw $ e ;
284289 }
285290 }
291+ $ this ->eventLogger ->end ('route:url:match ' );
286292
287293 $ this ->eventLogger ->end ('route:match ' );
288294 return $ parameters ;
0 commit comments