Is there an open issue somewhere relating to the s...
# compose-web
z
Is there an open issue somewhere relating to the slow initial page load with wasm (in chrome, potentially others)?
a
Due to large binary size? There is one. You can optimize it uzing br/gzip encoding. BR encoding compresses skiko.wasm to 2500 KB. Almost acceptable
z
Honestly Im not sure why exactly, but that sounds reasonable. Is the skia library downloaded everytime I visit a new wasm website? Do you know what the original size of it is? Most of the wasm based websites I visit for research, I get around a 2-5s blank page before anything shows up. Even if theyre pretty simple. Reloading after that is fast, but in some cases I would just close the tab before waiting for stuff to load for so long, and Im sure others would feel the same way.
a
The original file is 7800 KB
j
We've been going through same discussions for the #confetti web client (https://wasm.confetti-app.dev/ )....one thing that helped here a bit was to add splash screen to show while files downloading. But we also need to add that compression mentioned
z
Confetti is one of the webpages Ive been using as a form of benchmark ๐Ÿ˜ƒ Would be interesting to see how big of a difference the compression makes!
j
we also removed following...can't remember history of why it was there but seemingly wasn't needed
Copy code
<script type="application/javascript" src="skiko.js"></script>
๐Ÿ‘๐Ÿฝ 1
๐Ÿ‘ 3
๐Ÿ˜ฏ 2
z
7800 kb doesnt sound too bad, I mean it should be fast on a 100/100 line?
j
fwiw changes so far are in following branch https://github.com/joreilly/Confetti/tree/kotlin_wasm
๐Ÿ‘Œ๐Ÿฝ 1
๐Ÿ‘ 1
๐Ÿ‘Œ 1
y
For Tiamat we added "native js" progress indicator and hide it when compose starts rendering Demo: https://composegears.github.io/Tiamat/ PR: https://github.com/ComposeGears/Tiamat/pull/24
๐Ÿ‘๐Ÿฝ 1
z
@Alexander Zhirkevich Just coming back to this today.. do you happen to have any example of how compressing to gzip would work in practice? I can do it manually, but seems like I need to do something more in order to serve the files correctly?
It does seem like netlify does this automatically, so the slow load times are after compression ๐Ÿ˜…
a
Not sure how it is done on Netlify. Firebase hosting picks most suitable encoding and performs compression automatically. I prefer it.