-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Description
Since v4.0.22 the source map (-gsource-map) for our application has become huge.
In v4.0.21, ourApp.wasm.map was 8.3 MiB, but in v4.0.22 and v4.0.23 it's 1.9 GiB, which hangs (Firefox) / crashes (Chrome) the browser when opening the console. (For chrome, we can use DWARF, but for Firefox this is not an option.) I presume that the cause for this is #25870.
Is there a possibility that this could be reduced, or maybe to add a setting to exclude certain large sections or truncate long names? Or maybe use mangled names (see below)?
Some observations:
- When compressed with a simple
gzip ourApp.wasm.map,ourApp.wasm.map.gzis just 24 MiB, meaning there's a lot of duplicate text in there. - I thinks the cause is probably the same as for [WebAssembly] Huge symbol name section in debug build llvm/llvm-project#126919, meaning demangling C++ templated identifiers lead to a size explosion. Indeed, a quick
cat ourApp.wasm.mapspams my screen with such identifiers. We're already using-Wl,--no-demangleto mitigate the LLVM issue, but this doesn't seem to affect the source map. - When counting word frequency, I see that our namespace occurs 33M times and
stdoccurs 29M times. The likely culprit,rxcpp, occurs 10M times (we want to ditch it but don't have time).
Metadata
Metadata
Assignees
Labels
No labels