-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[Issue] Improve setup:di:compile performance by using gc_disable #38035
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
Comments
Hi @engcom-Hotel. Thank you for working on this issue.
|
Hello @ilnytskyi, Thanks for the report and collaboration! We have tried to reproduce the issue in the 2.4-develop branch as well as from the PR. But there is no difference visible to us in both. Please have a look at the below screenshot for reference: Please let us know if we have missed anything. Thanks |
@engcom-Hotel it's actually visible, it takes 1 second less and uses a bit more memory. You can also try to check this on composer installation with MSI as there are more modules |
Hello @ilnytskyi, Thanks for the reply! We have tried to reproduce it with the latest version 2.4.7-beta1 and the results are the same. Please have a look into the below screenshot for reference: The difference is 1 second and in memory usage. Shall we consider this? Thanks |
@engcom-Hotel
And compare the output of real time from btw. I forgot to mention |
Make sure to properly test, it could be that the first run is slower if magento caches are empty.
Doing this myself on a pretty complex project, I'm only seeing 1sec difference, so I'm not convinced at the moment there is much to win here. |
Hello @hostep, Thanks for the detailed steps! I tried to same and the outcome is the same as yours. Please find below the screenshots for reference: With PR Changes in 2.4.7-beta1 The difference b/w is showing 1 sec, I agree with @hostep, at the moment there is much to win here. @ilnytskyi can you please provide some more updates on the same? Thanks |
Hi @ilnytskyi, This issue is being closed since it has not been updated in a long time.Please feel free to reopen or raise a new ticket if the issue still exists. Thanks. |
This issue is automatically created based on existing pull request: #38032: Improve setup:di:compile performance by using gc_disable
Description (*)
By disabling garbage collector the code generation finishes a bit faster:
contribution repo
With larger apps the difference is not that significant but noticeable
2.
2 minutes without changes

under 2 minutes with changes

I also checked calling
gc_collect_cycles
after each operation to save some memory, but the difference is not that significant and visible on the second screenshot.Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)
The text was updated successfully, but these errors were encountered: