4 ms·
I'm not arguing about page weight per se. The more code you have to download, parse, and run, the more CPU and memory and battery you'll be using. WASM enables
by pier25 2y ago
I'm not arguing about page weight per se. The more code you have to download, parse, and run, the more CPU and memory and battery you'll be using.
WASM enables certain use cases like using FFMPEG in the a browser or game engines running on canvas which are super cool. But for 99.99% of DOM related functionality, JS is really the way to go.
Edit:
Here's another example. Loads and executes like 10MB of WASM code for something that could be done in 100kB of JavaScript.
https://stalcrafthq.com/ https://stalcrafthq.com/
- TehGM 2y agoAuthor of ScHQ here. I want to explain the Blazor use here. While I think it's a bit of a stretch to say it'd be 100kB JS (the app does a LOT of client-side lifting, so it'd definitely take more than that), otherwise you're right - WASM, specifically Blazor, is heavy. It's a bunch of download and non-ideal start time. The reason I use Blazor here is that I work on this website alone, as a hobby project. This means I prefer to use tech (C# and .NET) I like to use instead of going lenghts learning additional frameworks. It also enables server and client share same code in places, so it can be used both in client and on server without having to program it twice. The website wouldn't be even nearly as feature rich if I had made it in JS. The point I am making - I'd not advise Blazor use for every app, and if you already are familiar with JS frameworks, they're a good (or even better) choice. However WASM and Blazor has niches outside of "I do super fancy stuff" websites. It makes rich website development possible for backend devs and other people familiar with other technologies. It's good to think outside of the box sometimes.
- neonsunset 2y agoInterestingly enough, it loads just 1.15 MB compressed with the biggest assets being logos on Firefox. At the same time, I can see it downloading far more assets (as if, unpacked and uncompressed blazor bundle?) on Edge/Chromium. What's going on?
- TehGM 2y agoMake sure you open the page in incognito/private window.