5 ms·
What’s the client bundle size for a “Hello World” in Blazor WebAssembly? Last I checked it was ~2.5MB, which makes it a non-starter for public-facing web apps,
by taejavu 6y ago
What’s the client bundle size for a “Hello World” in Blazor WebAssembly? Last I checked it was ~2.5MB, which makes it a non-starter for public-facing web apps, imo.
- cm2187 6y agoDepends which. An online trading platform? Possibly. But great for internal applications.
- taejavu 6y agoI’d argue internal applications are _the only_ acceptable use case for Blazor. I only mention it because this quote from the article strikes me as mildly disingenuous: > An app like this can basically scale forever, cheaply. It can put the browser to work (which was basically hanging out waiting for anglebrackets anyway) > It’s no more scalable than any other SPA framework as an Azure Static Web App, but it does require shipping a .Net runtime to every user. I’m surprised there’s rarely a mention of this important consideration in the discussions I’ve seen around Blazor.
- cm2187 6y agoMy understanding is that they do (or will do) some tree shaking to only transmit the bits of the runtime that are actually used. It's not like you will download a 60MB binary on every refresh. And it's not like a typical SPA doesn't come with its own bloat of js libraries. I do expect it so be slightly heavier. But to the point that a user will notice?
- taejavu 6y agoYep, and that's what the "2.5MB" in my original post referred to. So, a Blazor app that does nothing but print "Hello world" to the screen is as heavy as a horrendously bloated SPA that presumably does something of value. Yes the user will notice, just the same as they notice that horrendously bloated SPAs are slow.
- cm2187 6y agoBut that’s a slightly orthogonal problem. SPAs being misused is clearly an issue. A blog has no business being an SPA. But in the domains where SPAs make sense, I don’t know that it is going to be much heavier. Think webmail, online collaboration tools, trading platforms, etc.
- wenc 6y ago2.5MB doesn't seem like much for baseline overhead (assuming there's no tree shaking). After all, the incremental amounts for more complex apps might be small if most of the framework is already mostly contained in the 2.5MB (not sure if it is). Imagine being able to run CAD software or other apps with complex desktop UIs in the browser. I just tried loading NYTimes.com and it was 7.48MB. My Gmail page is 9.31MB. A blank Google Doc is 16.92MB. That said, the (very impressive) Pixilart web app is only 1.91MB. https://www.pixilart.com/draw https://www.pixilart.com/draw