Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Optimized weights (#10692)
Browse files Browse the repository at this point in the history
* Add optimization flags to 'release' profile

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Optimized weights

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add missing pallets

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add `production` profile

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* pallet-collective: fix tests

the weight of System.remark went to 0, the collective test uses a
remark call to trigger an out-of-gas condition so I replaced it
with a `remark_with_event` call.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
  • Loading branch information
ggwpez authored and eskimor committed Jan 27, 2022
1 parent 7979cb4 commit 96ccfc0
Show file tree
Hide file tree
Showing 33 changed files with 2,162 additions and 2,108 deletions.
11 changes: 11 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,17 @@ wasmi = { opt-level = 3 }
x25519-dalek = { opt-level = 3 }
yamux = { opt-level = 3 }
zeroize = { opt-level = 3 }

[profile.release]
# Substrate runtime requires unwinding.
panic = "unwind"

[profile.production]
inherits = "release"

# Sacrifice compile speed for execution speed by using optimization flags:

# https://doc.rust-lang.org/rustc/linker-plugin-lto.html
lto = "fat"
# https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units
codegen-units = 1
Loading

0 comments on commit 96ccfc0

Please sign in to comment.