DioxusLabs / DioxusLabs/dioxus

Subsecond bloats wasm bundle size in release mode

Open
#5,131 0 comments 0 reactions 0 assignees View on GitHub
bug subsecond
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**Problem**

In release mode, there are quite some subsecond related code in the wasm, resulting in a larger bundle size.

**Steps To Reproduce**

Steps to reproduce the behavior:

- `dx bundle --web --release --wasm-split`
- Access the website, find the wasm request, copy as curl, and download it
- `twiggy top logic.wasm`

It takes about 6% space in my case:
```
twiggy top logic.wasm | rg -i subsecond | awk -F'┊' '{ gsub(/%/, "", $2); sum += $2 } END { print sum }'
6.43
```

```
twiggy top logic.wasm | rg -i subsecond
43063 ┊ 3.08% ┊ >::call_it::he67825e518fcf2b4
20679 ┊ 1.48% ┊ >::call_it::h17338d679aab9d0b
9943 ┊ 0.71% ┊ >::call_it::h0c94f6c805ee28ad
4226 ┊ 0.30% ┊ >::call_it::h3de7d1f38838dfbc

...
```

**Expected behavior**

See nothing.

**Screenshots**

**Environment:**

- Dioxus version: 7.1
- Rust version: 1.91.1
- OS info: NixOS unstable
- App platform: web, fullstack

**Questionnaire**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.