-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
feat: enable LTO and codegen-units = 1 optimization #20927
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
Thanks @kiwamizamurai! Out of curiosity, did you try to benchmark to see any differences between not having this settings and having them? If so, what was the performance in terms of compilation times + binary size? |
@stefan-mysten In this repository, I haven't tried it yet. Let me check. |
We tried enabling it, but it fails to build and the GitHub CI cancels the operation due to taking too long at what it seems to be building the |
@stefan-mysten When I tried, I encountered the same issue. 🤔 Do you have any idea? |
Interesting, at least we know it's not an isolated issue on our side. I don't have ideas yet on what can be done, I assume that because the code is so large, these optimizations are quite computationally heavy and might take a few hours to complete. We might try a bit more on our side, but please let us know if you managed to get it working. Thank you! |
@stefan-mysten It seems that this repository requires me a lot of memory 🤔 32GB might not be enough. I keep investigating. |
@kiwamizamurai we made it compile but the build time increased 5-6x times, which is slightly concerning. Given that this might make a lot of our CI workflows fail due to the long build time, I will suggest that we do not merge these changes for now. I hope that you can keep these changes locally and build with these flags as you need. |
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.
Hi @kiwamizamurai, thanks for looking into this. As @stefan-mysten said, we may not be able to switch to compiling with lto by default right now. Can you make your change under another profile? Otherwise lgtm.
Co-authored-by: mwtian <[email protected]>
Thank you very much for your comments and investigation! I learned a lot from this project. I truly appreciate your help. I have created a separate profile. |
@kiwamizamurai appreciate your time looking into this optimization! |
Description
Enable Link-Time Optimization (LTO) for the project and other optimization
Test plan
building process is successfully completed
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.