emscripten-core / emscripten-core/emscripten

[wasm-split] Increase in wasm initialization time after split

Open
#20,608 3 comments 0 reactions 1 assignee Claimed by @tlively View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Please include the following in your bug report:

**Version of emscripten/emsdk:**
```
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.35 (a90c5abb489c516f59c0d16864d953d4bedd37da)
clang version 17.0.0 (https://github.com/llvm/llvm-project 6865cff8ea8b07d9f2385fd92cecb422404f0f35)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: ~/3.1.35/emsdk/upstream/bin
```

We have recently integrated module splitting in our code base with the aim of improving wasm download time. We were able to get primary module which is around 1 MB less in size that of the original module (8.5 MB). This led to decrease in wasm download time but the time after wasm download till the first line of `main` function is hit, has increased. This increase ranges from 10-20 ms. Is this increase expected? Does this have something to do with increase in the size of indirect table in primary split?

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.