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

Enable LTO in Rust release profile #32

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

Conversation

ruokun-niu
Copy link
Contributor

Description

Enabling Link Time Optimization (LTO) will reduce the binary size. By setting lto to be true in the release profile, LTO will only be enabled in our release build, as we use the command cargo install in our dockerfiles. When we do a local cargo build, LTO will not be enabled. To enable LTO in cargo build, run with the --release flag

Results from running the query-perf tests with and without LTO:
Without LTO: https://gist.github.com/ruokun-niu/70c0252f4a36bdf5f4d52febf35a9226
With LTO: https://gist.github.com/ruokun-niu/08de253ef74ae4b6fede0effcb695b48

Type of change

  • This pull request fixes a bug in Drasi and has an approved issue (issue link required).
  • This pull request adds or changes features of Drasi and has an approved issue (issue link required).
  • This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Drasi (issue link optional).

Fixes: #97

@ruokun-niu ruokun-niu requested a review from a team as a code owner October 28, 2024 18:49

```
./query-perf <ARGS>
./run_perf_tests.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ruokun-niu this change is not correct. This text talks about running the component test tool in general, this script just runs the tool using our set of pre-configured tests. Need to revert.

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.

Enable Link-Time Optimization (LTO) for the Rust part
3 participants