• M
    Refactor IDE open file diagnostic analysis + some perf improvements · c9215386
    Manish Vasani 提交于
    First step towards #44408
    
    1. Refactor IDE open file analysis so that we have a single place where we execute the analyzers for document analysis. I have preserved the existing IDE layer diagnostic caching in this PR, but it should hopefully go away in future when we move the diagnostic computation to OOP.
    2. Perf improvement: Currently, we execute open file analyzers one at a time by making separate calls into CompilationWithAnalyzers. This identified overhead where we are recomputing lot of stuff with each call and missing semantic model/bound node cache hits. This PR simplifies the approach by invoking a single syntax/semantic call into CompilationWithAnalyzers with all relevant analyzers. This required adding a new public API to CompilationWithAnalyzers to return syntax/semantic diagnostics for a tree/model grouped by analyzers, which has been split into a separate commit.
    3. Remove code for code fix support for CompilationEndAction diagnostics - these actions are not executed in the IDE live analysis, so the code was not executing. Additionally, we have identified that we never want to run these actions in IDE live analysis due to associated perf concerns.
    
    Future steps:
    1. Move open file diagnostic analyzer execution to OOP
    2. Remove IDE layer diagnostic caching, and rely on caching at OOP side
    3. Investigate moving even compiler diagnostic computation to OOP - need to ensure responsiveness of refreshing compiler diagnostics on typing is not affected
    c9215386
DocumentAnalysisExecutor.cs 14.0 KB