Composer interest in PHP 8.1 accelerated include resolving #9906
markrandall
started this conversation in
General
Replies: 2 comments 27 replies
-
To me, this makes perfect sense. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have emailed you twice on the internals list about this: https://externals.io/message/113545#113984 I still haven't seen an answer from you about the concerns I raised regarding having multiple autoloaders in one process. |
Beta Was this translation helpful? Give feedback.
27 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Greetings,
I am currently working on a PHP RFC for an accelerated autoload classmap, this RFC adds a new mechanism called autoload_set_classmap() which accepts an associative array of classname => file paths, and acts as an internal first-stage autoloader.
The change offers a 5% improvement in performance vs hitting composer's existing userland function and performing the lookup there (testing exclusively the autoload mechanism). As composer is the de-facto autoloader, the general consensus is that it would only be worth adding if Composer itself could take advantage of it.
The necessary change would be to call autoload_set_classmap as part of the existing autoloader registration, feeding in the existing static autoload classmap, with one exception, class names must be stored lowercase (as per internal class naming). This would be something that would be necessary to do as part of the dump autoload step.
Therefore, I ask would composer have an interest in using such a function should it be accepted for 8.1.
Beta Was this translation helpful? Give feedback.
All reactions