perf(sourcegen): Single-pass attribute classification by thomhurst · Pull Request #6111 · thomhurst/TUnit (original) (raw)

@thomhurst

…cation

Closes #6106

Generated source output is unchanged - verified by the snapshot tests in TUnit.Core.SourceGenerator.Tests (116 passed, 1 pre-existing skip, 0 failed, no .received.txt produced). No ISymbol is stored in incremental pipeline nodes; only post-Collect consumers touch symbols.

[claude[bot]](/apps/claude)

@thomhurst

…-> InterfaceHelper

Reverts the ConditionalWeakTable<ITypeSymbol,...> interface-name cache: caching Roslyn symbols in persistent generator state is an anti-pattern (cross-compilation rooting risk), and AllInterfaces is already lazily cached on the symbol by Roslyn, so the win was marginal. The class no longer caches, so the name is corrected to InterfaceHelper. Keeps the real wins from this PR (single-pass attribute classification, FirstOrDefault/Enumerable.Repeat LINQ removals).

Snapshots unchanged.

[claude[bot]](/apps/claude)

@thomhurst thomhurst changed the titleperf(sourcegen): real InterfaceCache + single-pass attribute classification perf(sourcegen): Single-pass attribute classification

May 28, 2026

@thomhurst thomhurst deleted the perf/issue-6106-sourcegen-interfacecache branch

May 28, 2026 23:02

This was referenced

May 29, 2026

This was referenced

Jun 13, 2026

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})