filecoin-project / ref-fvm

Reference implementation of the Filecoin Virtual Machine
https://fvm.filecoin.io/
Other
382 stars 137 forks source link

Wasm Size Optimization Log #315

Closed Stebalien closed 2 years ago

Stebalien commented 2 years ago

Wherein I record my attempts to optimize wasm actors for size. To start with, the miner actor weighs 2.3MiB uncompressed, ~520KiB compressed (zstd).

Stebalien commented 2 years ago

Tools:

Stebalien commented 2 years ago

Twiggy says that serde is the biggest problem, mostly due to monomorphization (which is also where it gets its speed).

raulk commented 2 years ago

@Stebalien where are with this? Can we scope what is indispensable for M1 and what we can push to M2?

Stebalien commented 2 years ago

I think we're going to need to compress, but we can punt to M2 if we really need to.

Although one thing that would be really nice is https://github.com/filecoin-project/ref-fvm/issues/321, of someone ends up having time.

raulk commented 2 years ago

Unchecked issues are not in scope of Phase 1 (nv16) and are now being tracked as individual issues targeting Phase 2.

Stebalien commented 2 years ago

No point in keeping this meta issue open.