-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WASM file size optimization #599
Comments
Someone recommended |
Regarding the possible solution I suggest above, a |
just out of interest, what is the smallest binary size someone has managed to achieve with Yew (even a simple hello world)? |
@kellpossible not yet! I'd love to start tracking that! |
@kellytk I read the above linked roadmap but am not seeing "lazy load" as a feature. How did this get implemented now, is there a way to lazy parts of a Yew application for faster startup? |
I'm submitting a ...
WebAssembly is the future of web-based code distribution but its files are large. The large file size imposes an unfavorable cost to
first-x
performance metrics such asfirst contentful paint
.How could that problem be optimally solved and which pieces of the
Yew
+wasm-bindgen
+wasm-pack
+bundler
stack would it involve?Possible Solution
Introduce a method of annotating component trees with something like a
load priority
. Eachload priority
scope would become a separate WASM file. When the app is loaded, its WASM files would be loaded based on theirload priority
.load priority
would need to be overridable by user demand. For example, if a dropdown menu is marked low priority and it hasn't loaded by the time a user clicks the menu's button to present it, it would be immediately fetched, mounted, then presented.The text was updated successfully, but these errors were encountered: