Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Dec 31, 2025

@CyrusNajmabadi
Copy link
Member Author

Fascinating. This tiny change massively affected razor.

{
return notificationManager.SendRequestAsync(GetWorkspaceRefreshName(), cancellationToken);
await notificationManager.SendRequestAsync(GetWorkspaceRefreshName(), cancellationToken).ConfigureAwait(false);
return;
Copy link
Member Author

Choose a reason for hiding this comment

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

note: this preserves thee old behavior. we were returning. so this would stop after the first hit. but i don't know if that's actually what we want here. note: if i don't return we get a high amount of memory use (presumably because we're issuing the refresh for a ton of cases. given that we dont' pass the docUri in, i'm guessing we do want tehse semantics.

Copy link
Member

@dibarbet dibarbet Jan 5, 2026

Choose a reason for hiding this comment

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

yes, the old behavior is correct. refresh notifications are typically server-wide, and don't apply to a specific document or project. Once we've sent one, we don't need to send any more as a single request indicates everything (for that feature) is out of date.

{
return notificationManager.SendRequestAsync(GetWorkspaceRefreshName(), cancellationToken);
await notificationManager.SendRequestAsync(GetWorkspaceRefreshName(), cancellationToken).ConfigureAwait(false);
return;
Copy link
Member

@dibarbet dibarbet Jan 5, 2026

Choose a reason for hiding this comment

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

yes, the old behavior is correct. refresh notifications are typically server-wide, and don't apply to a specific document or project. Once we've sent one, we don't need to send any more as a single request indicates everything (for that feature) is out of date.

@CyrusNajmabadi CyrusNajmabadi merged commit 0b75006 into dotnet:main Jan 5, 2026
25 of 26 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the asyncLSP branch January 5, 2026 20:49
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jan 5, 2026
@davidwengier davidwengier modified the milestones: Next, 18.3 Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants