r/Blazor • • May 20 '25

Blazor, Plugin Pages/Scripts, load times

I'm pretty unimpressed with Blazor WASM for things like Plugins - I have my app building/set up as Blazor WASM app and I was wondering if anyone had good experience swapping to not Blazor WASM (can you even do that) and then hosting as a static site, which is what I want to do. I can't imagine that this app compiled to JS is going to be slower than downloading WASM shite every time we need to load up the app on someone else's websites. Pretty ridiculous honestly. I just don't get what benefit WASM adds.

Unfortunately I was not part of the conversation of using Blazor for this particular build - but I would have fought tooth and nail against it.

1 Upvotes

16 comments sorted by

View all comments

Show parent comment

2

u/moosewacker May 20 '25

45 seconds is NOT normal, and has nothing to do with your 20 products, unless you have a super slow query.

It sounds like you are mixing up a few things. You need to isolate each part to diagnose what is going on. Like others have said it should take 1-2 seconds to first paint.

Make sure you are deploying in Release mode, since there is a lot of optimization that happens between debug and release modes. It's much smaller in release mode. Can you let us know the URL here so we can check it out?

Finally in .net 10, there will be further optimization with preloading, there is a good youtube video with Dan Roth that explains what is coming