Skip to content

[DELTA-1] Skip unnecessary symbol lookups in ConfigTestSetupStringsAnalyzer - #1001

Merged
sgrinwis-d2l merged 1 commit into
mainfrom
sgrinwis/config-test-setup-symbol-lookups
Nov 26, 2026
Merged

sgrinwis-d2l merged 1 commit into
mainfrom
sgrinwis/config-test-setup-symbol-lookups

Conversation

@sgrinwis-d2l

@sgrinwis-d2l sgrinwis-d2l commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

If we swap the order of these checks, this runs 88% faster against D2L.LP.IntegrationTests, but I believe the results should be identical.

Checking a binlog, this is currently the slowest analyzer we have.

Copilot AI balanced review requested due to automatic review settings November 20, 2026 18:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the analyzer’s symbol-lookup optimization.

No open issues 🎉

What changed in this PR

This PR reduces unnecessary Roslyn symbol lookups in ConfigTestSetupStringsAnalyzer while preserving symbol-based identification of ConfigTestSetup attributes.

Changes:

  • Checks argument count and skips nameof(...) expressions before resolving attribute symbols.
  • Retains the existing symbol comparison for remaining candidates, preserving alias support and excluding unrelated attributes.
File Description
src/​D2L.CodeStyle.TestAnalyzers/​NUnit/​ConfigTestSetupStringsAnalyzer.cs Moves syntax checks ahead of semantic lookup to reduce analyzer overhead.

Review effort: Balanced

@sgrinwis-d2l sgrinwis-d2l changed the title Skip unnecessary symbol lookups in ConfigTestSetupStringsAnalyzer [DELTA-1] Skip unnecessary symbol lookups in ConfigTestSetupStringsAnalyzer Nov 20, 2026
@sgrinwis-d2l
sgrinwis-d2l marked this pull request as ready for review November 20, 2026 18:26
@sgrinwis-d2l
sgrinwis-d2l merged commit 26d8573 into main Nov 26, 2026
6 checks passed
@sgrinwis-d2l
sgrinwis-d2l deleted the sgrinwis/config-test-setup-symbol-lookups branch November 26, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants