-
Notifications
You must be signed in to change notification settings - Fork 228
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
[HOLD] chore: lto makes a smaller and/or faster executable #1398
Conversation
@xxuejie is assigned as the chief reviewer |
Any ideas on how long it takes to build CKB in release mode? I think one major concern we had before was the linking time. Also, I think the size of CKB's large binary is not due to LTO, but the fact that we chose to enable debug infos in release mode now. In fact I do recall the release binary of CKB without debug infos is around 26MB last time I tried |
yes, this will increase the build time, but the LTO only enable when |
The 24M after In addition it's not just using |
Either
so move |
When using the |
build time: benchmark: strip: |
https://doc.rust-lang.org/rustc/profile-guided-optimization.html
|
I think they are not mutually exclusive. |
It's not urgent! We don't have to chage it immediately. |
cargo bench
|
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.
Hold as requested by @doitian.
Hold since we have to evaluate whether the change will affect performance. |
before the size of ckb is 407m,
after
lto = true
it's 307M,after
codegen-units = 1
it's 256Mhttps://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units
refs: https://lifthrasiir.github.io/rustlog/why-is-a-rust-executable-large.html
Question: after
strip
the size is sharply down to 24M, but the stack info is not human readable, what about addingsentry_disable
cfg and for this special artificial we could strip it before release. The disadvantage is that the user would always prefer the smaller size one.