Speed up autowiring to not use reflection at run time #58568
Replies: 1 comment 2 replies
-
|
What is the practical problem you are solving with this? What benchmarks have you run to indicate that this is a vital change necessary for applications using your fork of the Laravel framework versus this being a theoretical concern? Laravel uses a runtime-based dynamic dependency injection container, which means it is designed to run without a build step. How does your modifications affect this behavior? If you're this concerned about the performance of the container, why not evaluate incorporating compiled containers such as Symfony's DependencyInjection component or projects like PHP-DI? How do your changes impact the purpose-built dynamic functionality of the container (such as the Instead of rewriting the container internals, have you evaluated other practices such as manually defining service factories, which would also bypass autowiring for supported use cases? If I'm being honest, if you don't like Laravel's dynamic container, given how deeply rooted the container is into the framework, you're probably better off creating another toolkit that doesn't rely on Laravel's dynamic container. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been thinking at this for the past months now and today I finally put together a POC for it.
macropay-solutions/maravel-framework#34
The idea is to move the reflection at deploy time from run time for the autowiring.
I would be happy to hear some thoughts on this.
Thank you.
Update
This does not include instantiations.
Beta Was this translation helpful? Give feedback.
All reactions