-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Improve setup:di:compile performance by using gc_disable #38032
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
…g code generation
Hi @ilnytskyi. Thank you for your contribution! Add the comment under your pull request to deploy test or vanilla Magento instance:
❗ Automated tests can be triggered manually with an appropriate comment:
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento create issue |
@ihor-sviziev partially yes. There are other cases where this approach is used like PHPstan https://phpstan.org/blog/phpstan-1-6-0-with-conditional-return-types |
@engcom-Delta, any updates on testing these changes? |
@ihor-sviziev: I believe testing results are availabe on the associated issue: #38035 |
@magento run all tests |
❌ QA not Passed We have tested the functionality of the below command with and without PR changes (on the vanilla instance), but the outcome is almost the same:
Please find below the screenshots of the outcome for reference: We are using the Mac environment to test this PR. Please review the PR changes and let us know if we missed anything. Thanks |
Hi @ilnytskyi, I trust you've reviewed this comment. We haven't noticed significant differences with or without the PR changes. Kindly reconsider this and inform us if anything has been overlooked. Thank you. |
Hello @ilnytskyi, Thank you for your contribution! As we have been unable to get any reply from your side for a long time, we are closing this PR for now. Whenever you are ready to take this up please free to reopen it or ask us to reopen the same. We will be happy to do that. Thanks again! |
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 (*)
Resolved issues: