Skip to content

Optimize release profile #38

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

simonmarty
Copy link
Contributor

@simonmarty simonmarty commented Nov 18, 2024

Issue #, if available: See #9

https://doc.rust-lang.org/cargo/reference/profiles.html

Description of changes:

Experimenting with release profile parameters

  • lto = "thin to use link time optimization across the dependency tree. This increases the binary size by 0.5MB on stable-x86_64-apple-darwin. At the moment I'm not seeing a significant performance disparity between this being set to "thin" or "off". This might differ between platforms.
  • codegen-units = 1, significantly increases compilation time, is supposed to help with optimization, does appear to reduce binary size by a little over 1MB.
  • strip = true Removes symbols and debug info, reduces binary size (13MB -> 9MB).

Before merging:

Run a load test and verify this leads to a consistent performance improvement on

  • stable-x86_64-unknown-linux-gnu
  • stable-x86_64-unknown-linux-musl
  • stable-aarch64-unknown-linux-gnu
  • stable-aarch64-unknown-linux-musl
  • stable-x86_64-pc-windows-msvc

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.07%. Comparing base (f40c51a) to head (8e9c272).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #38   +/-   ##
=======================================
  Coverage   42.07%   42.07%           
=======================================
  Files          15       15           
  Lines        8598     8598           
=======================================
  Hits         3618     3618           
  Misses       4980     4980           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants