Web download: 4.5 MB of wasm, a quarter of it debug info #231
Labels
No labels
area/ci
area/desktop
area/packaging
area/protocol
area/reading
area/ui
area/web
area/writing
kind/bug
kind/feature
kind/infra
kind/request
needs/user
parked
perf
security
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
littlefox/neokom#231
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found in the codebase review (#230, D-058).
The release web build (
dx build --platform web --release, as the image does it) gives aneokom_bg-*.wasmof 4.49 MB (1.22 MB gzip, 0.95 MB zstd as Caddy serves it). It was 2.39 MB on 2026-10-16, so it nearly doubled in five days. Sections of the current build:.debug_str.debug_info.debug_line.debug_*So about 1.3 MB is DWARF debug info, which no user needs. The workspace
Cargo.tomlhas no[profile.release]at all, so we get the defaults: opt-level 3, no LTO, 16 codegen units, no strip, unwinding panics.To try, measuring size and the e2e suite for each step:
strip = "debuginfo"(or check why dx's wasm-opt step leaves the sections in);lto = "fat",codegen-units = 1;panic = "abort"for the wasm build;opt-level = "z"/"s"for the web only (a[profile.wasm-release]dx can be pointed at), if speed holds;twiggy top/cargo bloaton the wasm. Look for generics instantiated many times and for the dependencies added in 0.4/0.5.The desktop binary gets the same profile, so measure its size and startup too.
Also: a CI check that fails when the gzip size of the wasm grows past a set budget, so the next doubling is noticed when it happens.
Merged in #257; main run #426 green. The web build is 2.06 MB, 783 KB gzipped (from 4.49 MB, 1.22 MB). Verified: full e2e on three profiles (330 passed) with the size build;
tools/perf.shshowed "s" and "z" equally fast;tools/wasm-size.shruns in CI with a 900 KB budget.