dfinity/sdk

`dfx build` is much slower than direct usage of `moc`

vporton opened this issue · 0 comments

First raised at https://forum.dfinity.org/t/why-is-dfx-build-much-slower-than-direct-usage-of-moc/29513

$ time moc --idl --stable-types `mops sources` -o ~/t/test.wasm stress-test/stresser.mo
...
|real|0m33.963s|
|---|---|
|user|0m33.733s|
|sys|0m0.367s|

but

$ time dfx build stresser
...
|real|0m51.280s|
|---|---|
|user|0m52.176s|
|sys|0m2.641s|

stresser canister has no dependencies.

So dfx build is nearly 2 times slower than plain moc invocation. Why? (I suspect that it builds also a wallet canister and is slow because of this.)

This needs to be fixed: dfx build should be faster (or provide flags to make it fast).