Again improve symfony http.route resolution#3779
Conversation
|
✨ Fix all issues with BitsAI or with Cursor
|
Benchmarks [ tracer ]Benchmark execution time: 2026-04-09 15:38:15 Comparing candidate commit 9b21f02 in PR branch Found 1 performance improvements and 3 performance regressions! Performance is the same for 190 metrics, 0 unstable metrics. scenario:EmptyFileBench/benchEmptyFileBaseline-opcache
scenario:MessagePackSerializationBench/benchMessagePackSerialization
scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache
scenario:SamplingRuleMatchingBench/benchGlobMatching4
|
| )->withExactTags([ | ||
| 'symfony.route.action' => 'AppBundle\Controller\CommonScenariosController@simpleAction', | ||
| 'symfony.route.name' => 'simple', | ||
| 'http.route' => '/simple', |
There was a problem hiding this comment.
Why http.route is not on tests any more?
There was a problem hiding this comment.
I disabled it for old versions of Symfony. There, we don't have the files in the cache dir and falling back on getRouteCollection() is too slow.
estringana
left a comment
There was a problem hiding this comment.
Can you please remove the code coming from glopes/claude-ci branche since it's not on this pr where that should be reviewed plz?
8388154 to
34ef11e
Compare
Turns out it's quite feasible to resolve at runtime the route path from the route name using files in the Symfony cache dir. Not only that, but that strategy was already being used in EndpointCatalog.php. This fixes a performance issue -- avoid the deserializaiton and possible transfer from Redis of the full route collection cache on every request. The routing data is in PHP files and with opcache it's basically just one big compile-time variable.
34ef11e to
9b21f02
Compare
Turns out it's quite feasible to resolve at runtime the route path from the route name using files in the Symfony cache dir. Not only that, but that strategy was already being used in EndpointCatalog.php.
This fixes a performance issue -- avoid the deserializaiton and possible transfer from Redis of the full route collection cache on every request.
The routing data is in PHP files and with opcache it's basically just one big compile-time variable.
Description
Reviewer checklist