Skip to content

Update xunit.analyzers#46349

Merged
sharwell merged 5 commits intodotnet:mainfrom
sharwell:update-xunit-analyzers
Jun 3, 2022
Merged

Update xunit.analyzers#46349
sharwell merged 5 commits intodotnet:mainfrom
sharwell:update-xunit-analyzers

Conversation

@sharwell
Copy link
Copy Markdown
Contributor

@sharwell sharwell commented Jul 27, 2020

The new analyzers are primarily IOperation based, which substantially improves build performance. Most of the performance benefits come from the following changes:

@sharwell sharwell requested review from a team as code owners July 27, 2020 16:14
Copy link
Copy Markdown
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

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

Code is good but please coordinate with the myget removal effort prior to merging this.

@jaredpar
Copy link
Copy Markdown
Member

@sharwell

The new analyzers are primarily IOperation based, which substantially improves build performance.

Can you post the results of the before / after for the analyzer perf tests you run on Roslyn? The stress tool you have. Would be nice to see the real gains here.

@sharwell
Copy link
Copy Markdown
Contributor Author

@jaredpar The changes seemed to save ~20 seconds for a command line build with analyzers. I can't get meaningful relative number prior to the named pipes fix in VBCSCompiler (currently the build doesn't use the compiler server, which causes more than a 2:1 increase in build times).

Copy link
Copy Markdown
Member

@Youssef1313 Youssef1313 left a comment

Choose a reason for hiding this comment

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

@sharwell I think there is no longer need for the myget reference. So this PR is no longer blocked and can be worked on.

@sharwell sharwell force-pushed the update-xunit-analyzers branch from 8cdc5ca to ecc3027 Compare January 21, 2022 16:15
@sharwell sharwell marked this pull request as ready for review January 21, 2022 16:27
@jaredpar
Copy link
Copy Markdown
Member

Convert SyntaxNode analyzers to symbol analyzers xunit/xunit.analyzers#143

Curious: why does this result in a perf win? My intuition is that it would be cheaper to do syntax based checks when possible.

@sharwell
Copy link
Copy Markdown
Contributor Author

sharwell commented Jan 21, 2022

Convert SyntaxNode analyzers to symbol analyzers xunit/xunit.analyzers#143

Curious: why does this result in a perf win? My intuition is that it would be cheaper to do syntax based checks when possible.

Syntax checks are faster when checking syntax. In this case, the syntax checks were using SemanticModel to access symbol information. Rather than use the SemanticModel on a syntax path that's expected to be fast, we use a symbol callback that occurs later and provides the necessary symbol information up front / without extra cost.

@sharwell sharwell enabled auto-merge January 31, 2022 19:59
@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

@sharwell What do you think we should do with this PR?

@sharwell
Copy link
Copy Markdown
Contributor Author

sharwell commented Jun 3, 2022

Now updated again, should merge when the build finishes.

@sharwell sharwell merged commit 0a7a1c0 into dotnet:main Jun 3, 2022
@ghost ghost added this to the Next milestone Jun 3, 2022
@RikkiGibson RikkiGibson modified the milestones: Next, 17.3 P3 Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.