-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
- enabled `serde` features in dependent crates, no gate feature introduced, linker should do the job and strip unused code. - frame::staking: added impl of `serde::Serialize, serde::Deserialize` for `enum Forcing` - primitives::runtime: impl_opaque_keys macro provides `Serialize/Deserialize` impl if `serde` is enabled - primitives::staking: added impl of `serde::Serialize`, `serde::Deserialize` for `enum StakerStatus`
0ef9505
to
1a4c96c
Compare
Co-authored-by: Bastian Köcher <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
bot merge |
It is somewhat confusing that |
I mean this is expect-able, but how much does it slow down the compilation? |
Doing a/b testing would be tricky, hard to say the exact impact. |
* frame: support for serde added - enabled `serde` features in dependent crates, no gate feature introduced, linker should do the job and strip unused code. - frame::staking: added impl of `serde::Serialize, serde::Deserialize` for `enum Forcing` - primitives::runtime: impl_opaque_keys macro provides `Serialize/Deserialize` impl if `serde` is enabled - primitives::staking: added impl of `serde::Serialize`, `serde::Deserialize` for `enum StakerStatus` * frame::support: serde for pallets' GenesisConfig enabled in no-std * Cargo.lock updated * Update primitives/staking/Cargo.toml Co-authored-by: Bastian Köcher <[email protected]> * fix * Cargo.lock update + missed serde/std in beefy --------- Co-authored-by: Bastian Köcher <[email protected]>
This is confusing to me. I don't really want all the extra code in my runtime to serialize/deserialize types. Those codes are never going to be used and bloat my wasm. |
LTO should automatically remove most of the unused stuff. But assuming it somehow doesn't, can you show and measure how much exactly it bloats up your WASM blob? |
I need to make my code compile before I can have numbers. And with paritytech/polkadot-sdk#25 in mind, one of the goal is to be able to build genesis in wasm, so that those code won't be optimized out by LTO eventually. But that brings up a good point, I guess we could have some CI task to measure the kitchen sink runtime wasm code size so we can see if a feature increased it significantly. Something like this paritytech/smoldot#2994 (comment) |
|
serde
features in dependent crates, no gate feature introduced, linker should do the job and strip unused code.serde::Serialize, serde::Deserialize
forenum Forcing
Serialize/Deserialize
impl ifserde
is enabledserde::Serialize
,serde::Deserialize
forenum StakerStatus
serde::Serialize/Deserialize
implemented for palletsGenesisConfig
inno-std
Step towards: paritytech/polkadot-sdk#25
polkadot companion: paritytech/polkadot#7312
cumulus companion: paritytech/cumulus#2660