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

Change release build flags to optimize for size #6907

Merged
merged 1 commit into from
Jul 28, 2020
Merged

Conversation

ry
Copy link
Member

@ry ry commented Jul 28, 2020

This decreases binary size by about 11% and also speeds up built-time for release builds (due to codegen-units = 1).

target/release/deno
this pr    41800776
master     47233300

I want to land this and see what the effects on the benchmarks are. Because V8 is compiled separately, and is generally the bottleneck, it's possible this change will not effect the benchmarks much.

I got these tips from https://github.com/johnthagen/min-sized-rust

@ry ry requested a review from piscisaureus July 28, 2020 15:47
Copy link
Member

@piscisaureus piscisaureus left a comment

Choose a reason for hiding this comment

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

LGTM. Performance impact evaluation in 7 days.

@ry ry merged commit b7942bf into denoland:master Jul 28, 2020
@ry ry deleted the opt_size branch July 28, 2020 18:12
piscisaureus added a commit that referenced this pull request Aug 8, 2020
piscisaureus added a commit to piscisaureus/deno that referenced this pull request Aug 8, 2020
…" (denoland#6980)

The non-default build (codegen) flags are applied only when building the
binary, however they are not used when building the tests. This makes
cargo recompile all crate dependencies and effectively doubles the time
to build and test in release mode.

Additionally when we were "watching" the benchmarks, this was likely a
meaningless activity as they too could have been built without these
alternative flags.

This reverts commit b7942bf.
piscisaureus added a commit to piscisaureus/deno that referenced this pull request Aug 8, 2020
…" (denoland#6980)

The non-default build (codegen) flags are applied only when building the
binary, however they are not used when building the tests. This makes
cargo recompile all crate dependencies and effectively doubles the time
to build and test in release mode.

Additionally when we were "watching" the benchmarks, this was likely a
meaningless activity as they too could have been built without these
alternative flags.

This reverts commit b7942bf.
piscisaureus added a commit that referenced this pull request Aug 8, 2020
The non-default build (codegen) flags are applied only when building the
binary, however they are not used when building the tests. This makes
cargo recompile all crate dependencies and effectively doubles the time
to build and test in release mode.

Additionally when we were "watching" the benchmarks, this was likely a
meaningless activity as they too could have been built without these
alternative flags.

This reverts commit b7942bf.
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.

None yet

2 participants