dfinity / motoko

Simple high-level language for writing Internet Computer canisters

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Speed up compilation?

ZenVoich opened this issue · comments

It takes 25s to build a canister on my laptop, but it only uses up to 10% CPU.

Is it possible to somehow parallelize it to see 2.5s and 100% CPU load?)

Not easily, no. The motoko compiler is pretty sequential, and since we don't even do separate compilation for libraries, but whole program compilation, it'll probably stay that way.

However, if you are using mops, I wonder if your build times might be due to the use of the mops moc-wrapper indirection, which slows down dfx build significantly when used: ZenVoich/mops#222