-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: RouteCollection $routes optimization #7175
Conversation
With Xdebug turned off, updated the benchmarks. |
It seems the changes are only internal, and it doesn't change the usage. I think it can go to the next 4.3.2 release with add note for change structure in case user utilize the structure of it. |
25d7c45
to
f1ec2db
Compare
I found another type data in the $route array.
To distinguish between from and routeKey.
Updated the benchmark and added docs. |
@kenjis I do not have a correct understanding of this PR. Will the shield be affected? |
@datamweb No. This is an internal change to the |
Needs #7174This PR should go to4.4
branch.Description
Ref #6889 (comment)
RouteCollection::$routes
structureBefore:
After:
RouteCollection::$routesName
Benchmark
app/Config/Routes.php
:register 5001 routes:
find last route:
macOS 12.6.6
PHP 8.1.20 (cli) (built: Jun 8 2023 20:06:33) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.20, Copyright (c) Zend Technologies
with Zend OPcache v8.1.20, Copyright (c), by Zend Technologies
Checklist: