Skip to content

Conversation

@TimothyMakkison
Copy link
Contributor

@TimothyMakkison TimothyMakkison commented Jan 31, 2026

  • Add system to make AotConverterGenerator incremental
  • Descend root node once instead of descending twice

Before

Method Mean Error StdDev Gen0 Gen1 Allocated
RunGenerator 576.4 ms 10.45 ms 8.72 ms 11000.0000 3000.0000 101.98 MB

After

Method Mean Error StdDev Median Gen0 Gen1 Allocated
RunGenerator 329.8 ms 5.83 ms 13.04 ms 325.1 ms 11000.0000 3000.0000 101.19 MB

@claude
Copy link
Contributor

claude bot commented Jan 31, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@thomhurst thomhurst enabled auto-merge (squash) January 31, 2026 21:32
auto-merge was automatically disabled January 31, 2026 21:33

Head branch was pushed to by a user without write access

@thomhurst thomhurst enabled auto-merge (squash) January 31, 2026 21:34
@TimothyMakkison
Copy link
Contributor Author

Added AotConverterGeneratorIncrementalTests to verify that incremental caching is occuring.

auto-merge was automatically disabled January 31, 2026 21:45

Head branch was pushed to by a user without write access

@TimothyMakkison TimothyMakkison force-pushed the incremental_aot_converter_generator branch from 1b222c2 to 8b6ef69 Compare January 31, 2026 21:45
@TimothyMakkison
Copy link
Contributor Author

Last update, added assertion that for EquatbableArray<ConversionMetada> length to avoid mistakes I made when debgging these tests.

For the future: might be worth looking at using CreateSyntaxProvider or better yet ForAttributeWithMetadataName instead of descending every syntax tree.
That and using WellKnownTypes, SymbolAccessor (when added) and avoiding calling Members and GetAttributes repeatedly.

@thomhurst
Copy link
Owner

Yeah definitely. These source generators are definitely not optimized! I was learning them as I went along.

Appreciate the help!

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.

2 participants