-
Notifications
You must be signed in to change notification settings - Fork 111
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
change(rust): Use link-time optimisation in release builds #4184
Conversation
I'm running a full sync test here: This PR should be faster than the checkpoint PR. |
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.
This didn't seem to improve the sync time since opt-level=3 is already the default for release.
The other changes seem unrelated, did you mean to include them?
Ah nevermind, this was caused by the automatic rebase |
It's about 5 minutes faster. |
I'm running a full sync test for LTO here: We should merge if it is the same speed or faster than #4183, which was 5h53m. |
Failed due to #3991, restarted at: |
Previously they were in the Dockerfile, so they only applied to those builds.
Failed due to #3991, cherry-picked fix #4198, and restarted at: |
Worked in 5h47m 🎉 but failed macos-latest test for some reason ("Error: The operation was canceled.", but it didn't timeout?). I'll retry it |
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.
Looks good, but I'm assuming the retry logic will be reviewed in #4198
macOS failed with:
Port |
@Mergifyio update |
✅ Branch has been successfully updated |
Mergify queue PR #4184 failed with:
https://github.com/ZcashFoundation/zebra/runs/6185722377?check_suite_focus=true#step:9:2180 |
@Mergifyio refresh |
✅ Pull request refreshed |
Motivation
As part of #4155, we want to speed up the
zebrad
initial sync.Rust can optimise code at link-time, which reduces binary size, and seems to increase sync speed by about 5 minutes.
Specifications
https://doc.rust-lang.org/cargo/reference/profiles.html#lto
Solution
Related cleanups:
This makes the
zebrad
binary about 50 MB smaller on my machine, and the sync about 5 minutes faster.Review
Anyone can review this PR. It makes the sync faster, so it's a high priority.
Reviewer Checklist