Repository navigation
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22659Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22659" |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Consolidates and parallelizes startup JavaScript interop calls in the Aspire Dashboard to reduce Blazor Server client–server round trips on initial page load (especially noticeable over remote/high-RTT connections):
BrowserDimensionWatcher: Combineswindow.getWindowDimensionsandwindow.listenToWindowResizeinto a singlewindow.initializeWindowDimensionscall, guards nullViewportInformationinOnResizeAsync, and disposes theDotNetObjectReferenceinDispose().MainLayout: RunsThemeManager.EnsureInitializedAsync()andwindow.registerGlobalKeydownListenerconcurrently on first render, skips the redundant initialimport/updateThemecall (sinceapp-theme-bootstrap.jsandapp-theme.jsalready apply the initial theme and refresh the cookie before Blazor boots), and lazily importsapp-theme.jswhen the user changes the theme in Settings.ResourcesLayout: Consolidates the 6 post-import startup calls (usesCommandSelectionModifier,registerTabOverflow,registerResourceOrdering,registerResourceContextMenu,registerPaneActivityVisibility, and initialregisterPaneResizer) into a singleinitializeResourcesLayoutcall, and consolidates the 7 teardown calls inDisposeAsyncintodisposeResourcesLayout. Existing individual JS exports are preserved.Round-trip savings
BrowserDimensionWatcher(OnAfterRenderAsync)MainLayout(OnAfterRenderAsync)ResourcesLayout(OnAfterRenderAsync)ResourcesLayout(DisposeAsync)Across initial load, this eliminates 9 sequential JS interop round trips (15 → 6 across the three components; 5 RTTs off the critical path once
MainLayoutandResourcesLayoutoverlap afterBrowserDimensionWatcher: 2 + max(6, 7) = 9 → 1 + max(3, 2) = 4), plus 6 fewer RTTs onResourcesLayoutdisposal / run switching.Checklist
<remarks />and<code />elements on your triple slash comments?