-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DependencyInjection] Container building optimization #47176
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
Conversation
@nicolas-grekas can you look? |
Adding this to the 6.2 milestone as performance optimisations should be handled as new features. |
@nicolas-grekas can you look once again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(rebased for 6.2 and tweaked a bit)
Will be this optimization available in 5.4? |
5.4 accepts only bug fixes now. Only 6.2 gets improvements. |
Too bad for my project, but it will a motivation for updating %) |
Thank you @sveneld. |
When you have to much env variables and many services in your container, container compilаtion can take much time due to the function stripos which is called much time.
It happens because method freezeAfterProcessing try to find env placeholders in config, but make it in two foreach.
So i offer to get all possible placeholders with preg_match_all and do not use stripos for each placeholed.
Same situation with method resolveEnvPlaceholders. But in this method we should left stripos for hard cases when in value could be something like this 'env_1418b707a69b8575_const_HOST_74bcc04c4799f2ca10fb754fe5581c89env_1418b707a69b8575_const_CORE_URL_91ef68034c1e9e8b58c13725d3bafdc0'
In my project it helps me to save 40 seconds in container building.
Related to my previous fix #44876