Skip to content

Blazor Loader/Publisher Improvements #51821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
elepner opened this issue Nov 2, 2023 · 1 comment
Closed

Blazor Loader/Publisher Improvements #51821

elepner opened this issue Nov 2, 2023 · 1 comment
Labels
area-blazor Includes: Blazor, Razor Components design-proposal This issue represents a design proposal for a different issue, linked in the description ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved

Comments

@elepner
Copy link

elepner commented Nov 2, 2023

Summary

Blazor Wasm has a large bundle size and there's no way to avoid this. However there are steps to improve UX during loading. We use Blazor in production for thousands of our customers and quite happy with it but we had to implement quite complex loader by ourselves which solves the issues I want to describe this design proposal.

Motivation and goals

Very first application experience must go for a user as smooth as possible, thus Blazor loader should provide better capabilities than it does right now.

In scope

Here's the list that we had to implement in our DIY loader (it took us substantial amount of efforts in development and what's more important in testing. It'd be nice if those features would be available for everyone out of the box.

  1. Downloading progress in bytes should be available ( Blazor Download Progress Should Take Into Account Bundle Size And Expose Real Download Information #46549). As of now blazor provides % of downloaded bundle. It just counts files to be downloaded vs downloading ignoring that >50% of the bundle is dotnet.wasm file. Thus progress would stuck on the last step for a long time pissing off users badly.
  2. Better CDN integration:
    1. Append hashes to file names in the bundle (Append Hashes To Blazor Published Files #47575 ). Replacing files on CDN is quite bad idea because of heavy caching. We have experienced crashes of the application i production because wrong old version of some DLL was loaded. Blazor already computes hashes and exposes them through blazor.boot.json. Why not giving an option to append them to the file name? IMO, it should be default option like JS frameworks do.
    2. Give an ability to control maximum individual file size in the bundle to enable compression CDNs (Splitting dotnet.wasm when publishing #51772)

In conclusion

Since Blazor loader allows for any kind of customization it let us implement our requirements which is good. However, there's nothing extraordinary in those demands. Every Blazor developer would come across one of them eventually, so it's better that the platform would provide such opportunities out of the box.

@elepner elepner added the design-proposal This issue represents a design proposal for a different issue, linked in the description label Nov 2, 2023
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Nov 2, 2023
@mkArtakMSFT
Copy link
Contributor

Thanks for contacting us and sharing your scenarios, @elepner.
Given all these asks are already tracked by unique issues, we're going to close this one. Please upvote the linked issues (those you haven't filed yourself) so that we take your feedback into consideration when handling .NET 9 prioritization.

@mkArtakMSFT mkArtakMSFT closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2023
@mkArtakMSFT mkArtakMSFT added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label Nov 2, 2023
@ghost ghost added the Status: Resolved label Nov 2, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Dec 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components design-proposal This issue represents a design proposal for a different issue, linked in the description ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved
Projects
None yet
Development

No branches or pull requests

2 participants