-
Notifications
You must be signed in to change notification settings - Fork 10.3k
First page load or any subsequent refreshes always utilize Blazor Server, while booting WebAssembly in the background #54570
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
Comments
Are you expecting the execution to switch from server to WebAssembly while the component is running, or do you expect it to happen when the user navigates? Currently we don't switch from server to web assembly, because the components' state will be lost. |
Thank you for your response, @mkArtakMSFT . If the current behavior entails switching from the server to WebAssembly upon navigation, that aligns with expectations. However, I propose that this behavior should occur not only during the initial visit to the website but also for subsequent loads. Additionally, if this behavior could be made configurable, it would offer greater flexibility in managing. |
Could you please clarify what configuration options you're wanting? If you're asking for the ability to enable the live transition from server interactivity to WebAssembly interactivity (preserving component state), that's not something we plan to do for the time being. |
Certainly, I appreciate the opportunity to clarify. Current behavior: Proposal About Configuration Note |
@MackinnonBuck @mkArtakMSFT Is this change going to be implemented? It is very important and will eliminate any reason to not use Blazor. |
We think that the InteractiveServer render mode is what you want. The Blazor WebAssembly does have some small startup delay. We are going to optimize it as part of #54353, but there is still going to be some tiny delay remaining. |
@SteveSandersonMS Can you please take a look at this feature request. I am not talking about InteractiveServer render mode. I am asking about an enhancement in InteractiveServer mode. I think @SteveSandersonMS would get what I was trying to say. |
@zubairkhakwani The team talked about this issue several times and I'm afraid neither I nor the others get what you're trying to say.
You can configure this by choosing a rendermode:
Perhaps you mean something different from us by "page loads" but we don't know. |
@SteveSandersonMS Thank you for your response. I really appreciate it. let me explain it again. in rendermode InteractiveAuto Blazor Server is used only for the first page load once WebAssembly files are downloaded. and user navigates to another page the next page will now use WebAssembly that is perfect. now when the same user is revisiting the website next day, and he opens the website webassembly cache is already there now user have to wait until webassembly is started. In this second case i am suggesting that even if WebAssembly is cached we should use blazor server for the first load to give fast interactivity and when user navigates to another page, that page should now use WASM. I am attaching a GIF and i hope it helps in understanding my point in a better way. I hope i am able to explain it better this time. |
@zubairkhakwani I've made a similiar point in this #53799 issue. I think @MackinnonBuck's reply explains the situation nicely:
|
@lokitech Thank you for your comment. and yes I read your comment and it is what I was trying to say. Hopefully It'll get implemented. lets see |
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
Currently, when using Blazor in InteractiveAuto render mode, the application starts with Blazor Server on the initial load and transitions to WebAssembly once all DLLs are loaded and cached. However, on subsequent requests, it waits for WebAssembly to start, neglecting the benefits of Blazor Server.
Describe the solution you'd like
To enhance performance and user experience, I suggest implementing a mechanism where the first page load or any subsequent refreshes always utilize Blazor Server, while booting WebAssembly in the background. This approach can mitigate concerns about WebAssembly startup performance, as we can improve it up to a certain extent.
Making this behavior configurable would provide flexibility. Users could choose to wait for WebAssembly to load when the cache is available or opt for Blazor Server on every initial request, even if WebAssembly is downloaded.
By implementing this approach, we can optimize the application's performance and provide users with a smoother transition to WebAssembly while still leveraging the benefits of Blazor Server where applicable.
Would love to hear thoughts and feedback on this proposal.
Additional context
No response
The text was updated successfully, but these errors were encountered: