Skip to content
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: optimize release build for smaller size #45

Merged
merged 3 commits into from
Oct 13, 2024
Merged

Conversation

alemidev
Copy link
Member

No description provided.

@alemidev alemidev added core This issue is related to the core Rust library improvement Improve an existing feature labels Oct 12, 2024
@zaaarf
Copy link
Member

zaaarf commented Oct 13, 2024

Why "z" rather than any of the others? What's your reasoning? @alemidev

@zaaarf zaaarf self-requested a review October 13, 2024 12:48
@alemidev
Copy link
Member Author

@zaaarf while we care about integration speed in our CRDT, most of codemp's runtime is spent idle waiting either for user interaction or network I/O, so I think it's reasonable to prefer smaller binaries over faster hot sections.

I don't really have more definitive reasons to prefer size over optimization, as soon as we can notice performance issues we should revert this, but until then shaving off 66% of our binary size is quite impressive.

For reference: https://doc.rust-lang.org/cargo/reference/profiles.html#opt-level

Also, picked z over s because it results a bit smaller, but it's probably overkill

@alemidev alemidev merged commit 85630d2 into dev Oct 13, 2024
96 checks passed
@alemidev alemidev deleted the feat/small-binaries branch October 13, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core This issue is related to the core Rust library improvement Improve an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants