minor #66367 [FrameworkBundle][HttpKernel] Skip resolving the runtime mode on web requests (nicolas-grekas)
This PR was merged into the 8.2 branch. Discussion ---------- [FrameworkBundle][HttpKernel] Skip resolving the runtime mode on web requests | Q | A | ------------- | --- | Branch? | 8.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT `DebugHandlersListener` needs `kernel.runtime_mode.web` only when a console event is dispatched, yet it's built on every request, and resolving that parameter takes 8 env var lookups, one of them throwing `EnvNotFoundException` when `APP_RUNTIME_MODE` isn't set. The listener now gets it as an env closure, which removes 8 of the 18 env lookups of a prod request on the Symfony Demo: about 50µs, -2.5% on its homepage redirect. Needs #66366 on 8.1, so that `debug:container` can describe the new argument. Commits ------- f39a633c547 [FrameworkBundle][HttpKernel] Skip resolving the runtime mode on web requests
N
Nicolas Grekas committed
5000fef8f4d1a5404040984e67ec65edea2d76d2