-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Small tweaks to speed up ctrl-click #73442
Conversation
@@ -72,7 +73,8 @@ public async Task<(int? targetPosition, TextSpan tokenSpan)> GetTargetIfControlF | |||
if (token == default) | |||
return default; | |||
|
|||
var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false); | |||
// We don't need nullable information to compute control flow targets. So avoid expensive work computing this. | |||
var semanticModel = await document.GetRequiredNullableDisabledSemanticModelAsync(cancellationToken).ConfigureAwait(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debugged through, and there are no other codepaths where we retrieve semantic models for this feature.
// don't want to wait on expensive operations like computing source-generators or skeletons if we can avoid | ||
// it. So first try with a frozen document, then fallback to a normal document. This mirrors how go-to-def | ||
// works as well. | ||
return await GetDefinitionLocationWorkerAsync(document.WithFrozenPartialSemantics(cancellationToken)).ConfigureAwait(false) ?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is what we did in #72714. however, we still have not fully unified all the codepaths involved in navigating to a symbol :'( so there's still the need to update in a one-off manner like this. ideally this can be unified in the future.
@ToddGrun ptal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.