IRC channel logs

2025-11-16.log

back to list of logs

<sneek>wb ArneBab!!
<ArneBab>I managed to cut the load time by about 30-50ms via preloading of my own wasm file: https://www.draketo.de/software/programming-basics-wisp#deploy-hoot-wasm
<ArneBab>try it out: https://www.draketo.de/software/hoot.html
<ArneBab>What I still lack is a way to do the <link rel="preload" as="fetch" href="hoot.wasm"></link> trick for wtf8.wasm and reflect.wasm -- loading those two files serially costs about 50-80ms in load time for new users (270ms instead of 190ms).
<ArneBab>This delay isn’t just numbers: you can see the Hello World on that page appear after the title. Preloading wtf8.wasm and reflect.wasm should make it fast enough that the Hello World appears instantly.
<ArneBab>(directly during first display)
<ArneBab>instantiate_streaming cannot take advantage of preloading, because the cors and credentials parameters to not match. Needs fetch("hoot.wasm", {credentials: 'include', mode: 'no-cors'}) for the same domain. For cross-origin see https://stackoverflow.com/a/78458099
<ArneBab>I fixed it …
<ArneBab>I’m down to 147ms for new visitors and 65-80ms for returning visitors …
<ArneBab>see https://www.draketo.de/software/hoot.htmlhttps://www.draketo.de/software/programming-basics-wisp#deploy-hoot-wasm -- in half the page loads the Hello World doesn’t flicker anymore. And it’s still all on 2 DinA6 pages (⇒ pocket-sized)
<ArneBab>it’s a hack (rebinding window.fetch to include the required options), but it works and it makes hoot usable on first load.
<ArneBab>would be great if someone could test it on safari … (that’s the browser I cannot test it on)
<ArneBab>⇒ open https://www.draketo.de/software/hoot.html and check in devtools if all the js and wasm files start loading at the same time.
<ArneBab>(ignore the favicon …)
<ArneBab>sneek: later tell dthompson: the logs could interest you (startup speed of hoot so a game isn’t only fast but also starts almost instantly). See with devtools: https://www.draketo.de/software/hoot.html
<sneek>Got it.
<ArneBab>sneek: botsnack
<sneek>:)