mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2024-06-08 19:32:22 +00:00
release optimization
This optimization is not only for size but also runtime. Who doesn't want to use less CPU cycles? ;-) Since releases are not done that often and usually via build machines and pipelines, I don't see it as an issue that the build time doubled. | Description | Change | Before | After | |---------------------|--------|----------|-----------| | Build time | +110% | 5min 31s | 11min 34s | | Binary size (bytes) | -42% | 49466432 | 28576480 | Build command: `cargo build --features sqlite,mysql,postgresql --release`
This commit is contained in:
parent
19e671ff25
commit
4fa4600e11
10
Cargo.toml
10
Cargo.toml
|
@ -168,10 +168,14 @@ rocket = { git = 'https://github.com/SergioBenitez/Rocket', rev = 'ce441b5f46fdf
|
|||
# rocket_ws = { git = 'https://github.com/SergioBenitez/Rocket', rev = 'ce441b5f46fdf5cd99cb32b8b8638835e4c2a5fa' } # v0.5 branch
|
||||
|
||||
# Strip debuginfo from the release builds
|
||||
# Also enable thin LTO for some optimizations
|
||||
# Also enable fat LTO, opt-level 3, codegen-units 1 for best optimization
|
||||
[profile.release]
|
||||
strip = "debuginfo"
|
||||
lto = "thin"
|
||||
opt-level = 3
|
||||
debug = false
|
||||
panic = "unwind"
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
strip = true
|
||||
|
||||
# Always build argon2 using opt-level 3
|
||||
# This is a huge speed improvement during testing
|
||||
|
|
Loading…
Reference in New Issue
Block a user