Skip to content

Conversation

@ToddGrun
Copy link
Contributor

@ToddGrun ToddGrun commented Apr 4, 2023

Instead, switch this to an IViewTaggerProvider and tag the current view +- 100 lines. This changes time spent in CSharpStringIndentationService from about 1700ms to < 50 ms when typing a couple lines of code in a large C# file.

*** Previous ***
image

*** New ***
image

This reduces samples under GetStringIndentationRegionsAsync from 2.9% to 0.1%.

…e on every request.

Instead, switch this to an IViewTaggerProvider and tag the current view +- 100 lines. This changes time spent in CSharpStringIndentationService from about 1700ms to < 50 ms when typing a couple lines of code in a large C# file.
@ToddGrun ToddGrun requested a review from a team as a code owner April 4, 2023 01:58
@ToddGrun ToddGrun requested a review from a team April 4, 2023 01:58
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 4, 2023
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

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

approving as long as you smoke tested this on a large file with raw string literals in it (like one of our test case files).

@ToddGrun
Copy link
Contributor Author

ToddGrun commented Apr 4, 2023

as you smoke tested this on a large file with raw string literals in it (like one of our test case files).

Yep, tested by adding several raw string literals to LanguageParser.cs and scrolling through the file and making sure the indentation lines were shown for them. Also verified typing and scrolling both re-queried the system.

@ToddGrun ToddGrun merged commit f24094a into dotnet:main Apr 4, 2023
@ghost ghost added this to the Next milestone Apr 4, 2023
@dibarbet dibarbet modified the milestones: Next, 17.7 P1 Apr 25, 2023
@mavasani mavasani added the Performance-Scenario-Diagnostics This issue affects diagnostics computation performance for lightbulb, background analysis, tagger. label May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE Performance-Scenario-Diagnostics This issue affects diagnostics computation performance for lightbulb, background analysis, tagger. untriaged Issues and PRs which have not yet been triaged by a lead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants