Skip to content
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

Slow down the work navbar does, and cancel updating it when receiving a high volume of user events #73680

Merged
merged 5 commits into from
May 23, 2024

Conversation

CyrusNajmabadi
Copy link
Member

I couldn't perceive any issue changing this. And it helps us not hit the UI thread too often while doing something like scrolling quickly. There's little value in having the nav bars have to update that quickly, especially as it forces a UI thread switch that we're seeing in UI delays.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner May 23, 2024 22:38
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels May 23, 2024
@CyrusNajmabadi CyrusNajmabadi requested a review from ToddGrun May 23, 2024 22:41
@@ -64,7 +64,7 @@ internal partial class NavigationBarController : IDisposable
/// compute the model once for every batch. The <c>bool</c> type parameter isn't used, but is provided as this
/// type is generic.
/// </summary>
private readonly AsyncBatchingWorkQueue<bool, NavigationBarModel?> _computeModelQueue;
private readonly AsyncBatchingWorkQueue<VoidResult, NavigationBarModel?> _computeModelQueue;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switched to VoidResult to make it clear this value isn't used.

asyncListener,
_cancellationTokenSource.Token);

_selectItemQueue = new AsyncBatchingWorkQueue(
DelayTimeSpan.NearImmediate,
DelayTimeSpan.Short,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed the cadence on this, couldn't observe any problem at this speed.

Copy link
Contributor

@ToddGrun ToddGrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants