-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Perf issues editing files with nested #if and #region #5394
Labels
Milestone
Comments
KevinH-MS
added
Area-IDE
Tenet-Performance
Regression in measured performance of the product from goals.
labels
Sep 22, 2015
Did you repro this with 1.0 or with 1.1 because we made an Update 1 fix with #3515 |
I'm on RTM patched with the latest Roslyn bits. |
Does it repro with "smart indent" disabled? |
"Block indent" is equally slow; "None" is fast. |
rchande
pushed a commit
to rchande/roslyn
that referenced
this issue
Sep 22, 2015
Avoid repeatedly calling ISyntaxFactsService.IsInInactiveRegion, which calls SyntaxTree.GetToken. GetToken needs to traverse directive trivia to find the token it is attached to. This results in n ^ 2 traversals of the tree if there are repeated directive before the line to indent. Additionally, when the indenter determines that it's examining a line inside a disabled region, instead of examining the previous line, it examines the first line preceeding the current line that isn't inside a disabled region. Fixes dotnet#5394.
rchande
pushed a commit
that referenced
this issue
Sep 23, 2015
Speed up smart indenting in the presence of many inactive regions Fixes #5394.
Please verify, @KevinH-MS. |
Played around a bit with updated bits... LGTM 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
#region
inClass1
and hit {Enter}RESULTS:
VS becomes unresponsive and newline is not inserted for 5-6 seconds...
The text was updated successfully, but these errors were encountered: