Skip to content

[release/8.0] [Blazor] Auto render mode improvements #53291

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
wants to merge 3 commits into from

Conversation

MackinnonBuck
Copy link
Member

Auto render mode improvements

Backport of #53159

Improves the Auto render mode so that components are more responsive and have a decreased initial time to interactivity when WebAssembly resources are not already cached.

Description

One of the goals of the Auto render mode was to allow apps to become interactive as quickly as possible via Server interactivity, while WebAssembly bits were downloaded in the background for use on future visits to the site. However, since WebAssembly resources were being downloaded with maximal parallelism, the quality of the websocket connection required for Server interactivity was negatively impacted, often to the extent that the websocket wouldn't connect until WebAssembly resources had finished downloading completely, largely defeating the purpose of the Auto render mode.

This PR makes the following improvements:

  • Removes a problematic timeout on loading the WebAssembly boot config. This fixes a problem where Server interactivity was always being used when the boot config took too long to load.
  • Introduces a limit to the maximum parallel WebAssembly resource downloads when an Auto component initiates the startup of the WebAssembly runtime. This limit is set to 1 and overrides any user-specified limit.
  • Fixes an issue where the circuit sometimes remains open even if WebAssembly gets selected for Auto interactivity.

I provided a preview of these changes in #52154 (comment) so that customers could try them out, and the feedback so far has been very positive.

Fixes #52154

Customer Impact

A significant number of customers reported being affected by this problem in issues like #52154. I supplied customers with a preview of the fix that they could patch it into their app, and many indicated that their problems were resolved by the fix. The Auto render mode was one of the key features released in .NET 8, so it's important that it works in the way we've been advertising.
 

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

The core Auto render mode functionality is unaffected by this change - we added small tweaks to adjust the throttling amount and remove a problematic timeout. Additional tests were added to verify the changes in behavior, and we've been testing these changes manually to ensure they work well in real-world scenarios (various device types and connection qualities).

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@MackinnonBuck MackinnonBuck added Servicing-consider Shiproom approval is required for the issue area-blazor Includes: Blazor, Razor Components ask-mode This issue / PR is a patch candidate which we will bar-check internally before patching it. labels Jan 10, 2024
@MackinnonBuck MackinnonBuck requested a review from a team as a code owner January 10, 2024 23:27
@ghost
Copy link

ghost commented Jan 10, 2024

Hi @MackinnonBuck. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge.

To learn more about how to prepare a servicing PR click here.

@ghost ghost added this to the 8.0.x milestone Jan 10, 2024
@ghost
Copy link

ghost commented Jan 10, 2024

Hi @MackinnonBuck. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document.
Otherwise, please add tell-mode label.

@mkArtakMSFT mkArtakMSFT removed the ask-mode This issue / PR is a patch candidate which we will bar-check internally before patching it. label Jan 11, 2024
@MackinnonBuck
Copy link
Member Author

Test failure seems to be caused by the fact that dotnet/runtime#95870 hasn't flown through to this repo yet.

@mkArtakMSFT mkArtakMSFT added * NO MERGE * Do not merge this PR as long as this label is present. Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Jan 12, 2024
@ghost
Copy link

ghost commented Jan 12, 2024

Hi @MackinnonBuck. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed.

@mkArtakMSFT
Copy link
Contributor

mkArtakMSFT commented Jan 12, 2024

@MackinnonBuck, @wtgodbe from what I understand the internal PR (duplicate of this one) should be merged instead of this one. I've marked this as Approved by tactics, but leaving the mechanics up to you to get the mirror merged.
@MackinnonBuck please close this one, when the other one is merged.

@MackinnonBuck
Copy link
Member Author

Closing out this PR because it was merged in the internal branch.

@MackinnonBuck MackinnonBuck deleted the mbuck/backport-53159-to-8.0 branch November 5, 2024 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components * NO MERGE * Do not merge this PR as long as this label is present. Servicing-approved Shiproom has approved the issue
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants