roslyn: Very slow IntelliSense on relatively small code base

image

image

I’m not sure which process should be looked into for this case, devenv or ServiceHub.RoslynCodeAnalysisService.

GetSymbolInfo is commonly showing up as expensive in both:

  • ServiceHub.RoslynCodeAnalysisService: GetSymbolInfo is called by NameSyntaxClassifier.AddClassification
  • devenv: GetSymbolInfo is called by CSharpSyntaxContext.CreateContext and CSharpTypeInferenceService+TypeInferrer.InferTypesWorker_DoNotCallDirectly.

If I clear GroupPats and FoldPats (which I read somewhere, but I don’t understand what they actually do), I see GetUseSiteInfo starts showing up.

image

image

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 1
  • Comments: 22 (21 by maintainers)

Most upvoted comments

@jeromelaban I think it’s about shadowing, even if the code doesn’t have any methods that shadow others from base. It’s an algorithm that runs as part of the overload resolution:

https://github.com/dotnet/roslyn/blob/ef625f3b960594fcb3f902af88ad7c90df656516/src/Compilers/CSharp/Portable/Binder/Semantics/OverloadResolution/OverloadResolution.cs#L250-L257

@cston Re-sent.