Use new compiler symbol search helpers that are optimized for string names searches.#26331
Use new compiler symbol search helpers that are optimized for string names searches.#26331gafter merged 24 commits intodotnet:masterfrom
Conversation
|
Tagging @jcouv @dotnet/roslyn-ide . Note: this doesn't need to reviewed until dependent PRs go through. |
1a7f1f7 to
ed97f87
Compare
ed97f87 to
86fc051
Compare
|
Tagging @dotnet/roslyn-compiler for new APIs exposed from the Compilation objects. Tagging @dotnet/roslyn-ide for usages of that new API. |
|
Tagging @jcouv for being an honorary @dotnet/roslyn-compiler and @dotnet/roslyn-ide dev :D |
| ? compilation.GetSymbolsWithName(query.Name, filter, cancellationToken) | ||
| : compilation.GetSymbolsWithName(query.GetPredicate(), filter, cancellationToken); | ||
|
|
||
| var symbolsWithName = symbols.Select(s => new SymbolAndProjectId(s, project.Id)) .ToImmutableArray(); |
There was a problem hiding this comment.
Will do. #Resolved
| { | ||
| return this.SupportsCompilation && | ||
| await _solution.State.ContainsSymbolsWithNameAsync(Id, name, filter, cancellationToken).ConfigureAwait(false); | ||
| } |
There was a problem hiding this comment.
Near copy of the function directly below
| } | ||
|
|
||
| return compilation.ContainsSymbolsWithName(name, filter, cancellationToken); | ||
| } |
There was a problem hiding this comment.
Near copy of the function below
| return new PredicateSymbolSearcher(this, filter, predicate, cancellationToken).GetSymbolsWithName(); | ||
| } | ||
|
|
||
| #pragma warning disable RS0026 // Do not add multiple public overloads with optional parameters |
There was a problem hiding this comment.
these overloads shouldnot be a problem. There is no conflict/ambiguity between them and the existing overloads that take delegates.
|
@gafter for review of compiler change. Thanks |
|
We didn't get to this API change in today's review. Rescheduled for Tuesday. |
|
@CyrusNajmabadi |
gafter
left a comment
There was a problem hiding this comment.
Please make small doc change requested by API review team.
|
@CyrusNajmabadi |
Absolutely.
Will do!
I'm 100% ok with that. |
503e1c2 to
c805879
Compare
|
Pending merge approval. |
|
approved |
|
@jinujoseph Can you also approve for 15.8 ask-mode since there is an IDE change? Thanks |
|
Approved to merge for 15.8.Preview3 |
|
@gafter This PR is ready (approved by Jared and Jinu). But I don't know what "Squash and merge" is safe on a PR that includes merge commits from master... |
|
@jcouv I'm happy to rebase and submit for you to merge. Would you prefer that? |
|
@CyrusNajmabadi THANK YOU!!!!! |
|
Thank you! |
Followup to #26325 (merged) and #26330. in this PR i've updated the IDE to forward certain helpers to these more efficient implementations.
This helps things out by more quickly being able to determine if a type even contains a member with name, and thus whether or not it should even be hydrated into a symbol and have its members created. Previous we would have to do a linear scan on all the members in a type to determine this. Now this data is in a set which can be queried much more efficiently.