patternfly-yew / patternfly-yew/patternfly-yew-quickstart
WASM file size?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 29
- Forks
- 18
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 1
Description
Thanks for creating this template!
Creating the release build, as specified in the readme, shows this warning:
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
fonts/fa-solid-900.svg (775 KiB)
images/pfbg_992@2x.jpg (575 KiB)
images/pfbg_768@2x.jpg (354 KiB)
images/pfbg_2000.jpg (270 KiB)
main.js (1.17 MiB)
main.wasm (2.04 MiB)
Notably: main.wasm (2.04 MiB)
I checked the Yew optimizations guide (https://yew.rs/advanced-topics/optimizations#cargotoml) and was able to reduce it to 1.17 MB by adding this to the cargo.toml:
[profile.release]
# less code to include into binary
panic = 'abort'
# optimization over all codebase ( better optimization, slower build )
codegen-units = 1
# optimization for size ( more aggressive )
opt-level = 'z'
# optimization for size
# opt-level = 's'
# link time optimization using using whole-program analysis
lto = true
Still, 1.17 MB seems large (without all the assets). Would it be feasible to work on optimizing this template (including e.g. inspecting the binary with Twiggy)?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the release build described in the README and review the settings in Cargo.toml. Inspect main.wasm with Twiggy, then compare the resulting size after any feasible optimization; done means the template's WASM size has been investigated and the improvement is demonstrated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- performance, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100