Skip to content

Commit f1fc29b

Browse files
authored
Set opt-level z (#353)
Set opt-level to `z` and enable _fat_ `lto`. From testing this seems to result in a minimal performance decrease. Decrypting a vault of 2000 items in wasm goes from 1470ms to ~1500ms. While the `.wasm` filesize decreases from 3.5M to 1.9M.
1 parent bdcb5f5 commit f1fc29b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ opt-level = 1
104104

105105
# Turn on LTO on release mode
106106
[profile.release]
107-
lto = "thin"
108107
codegen-units = 1
108+
lto = true
109+
opt-level = "z"
109110

110111
# Stripping the binary reduces the size by ~30%, but the stacktraces won't be usable anymore.
111112
# This is fine as long as we don't have any unhandled panics, but let's keep it disabled for now

0 commit comments

Comments
 (0)