motoko icon indicating copy to clipboard operation
motoko copied to clipboard

[Perf] Ir type checking appears to be a bottleneck

Open crusso opened this issue 4 years ago • 3 comments

Paul reported a 1600Kloc project taking 22s to compile with ir-checking, 2s without.

moc version 0.6.6

https://dfinity.slack.com/archives/C02B1B4NG8G/p1631038938046500

crusso avatar Sep 07 '21 21:09 crusso

How many passes do we have on the IR? Is it checked after every one of them?

Maybe by default, we should just check the IR after the very last pass?

rossberg avatar Sep 08 '21 08:09 rossberg

If he uses dfx, he can set the option to not check IR in dfx.json.

On 9/8/21, Andreas Rossberg @.***> wrote:

How many passes do we have on the IR? Is it checked every one of them?

Maybe by default, we should just check the IR after the very last pass?

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dfinity/motoko/issues/2769#issuecomment-915028326

ggreif avatar Sep 08 '21 13:09 ggreif

I'm not surprised, and expect we want to disable the pass by default eventually - after all, it's just sanity checking, and shouldn't produce anything for our users (ideally…). Middle ground: by default only run once before code generation.

nomeata avatar Sep 08 '21 17:09 nomeata