emscripten-core / emscripten-core/emscripten

+641% compilation performance regression on small files

Open
#18,623 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Updating to latest, I find there is a large performance regression that has occurred, that is especially notable on small files.

Previously compiling small html file outputs like hello world used to feel "instantaneous". Now, when I run emcc, it takes well more than two seconds. Looking at a profile, there are some new steps that I don't recall from before:

![image](https://user-images.githubusercontent.com/225351/215272804-c3361162-8f24-427d-b7d5-18173b0f9345.png)

namely strip_producers, check_node, check_sanity all seem superfluous. This whole producers tracking is silly, could we not have Binaryen generate any fingerprintable toolchain producer info in the first place instead of running a postprocessing tool to remove the info?

Also, installations sourced via Emsdk should not need to run any sanity checks, and I could swear we had sanity checks disabled for Emsdk users already at some point?

Those would remove 61ms+205ms+29ms = 295ms, though that is still quite far short from getting "instantaneous" compilation performance on hello world? Are there other items that would be known to slow down compilation performance recently?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.