Skip to content

Conversation

@TimothyMakkison
Copy link
Contributor

@TimothyMakkison TimothyMakkison commented Oct 29, 2025

Use static Func to prevent closure capture of context.

Benchmarks (Timing is inaccurate)

Saves memory for attribute heavy files aka test files.

Before

Method Mean Error StdDev Gen0 Gen1 Allocated
Default_CodeFormatter_Tests 161.1 ms 5.35 ms 15.53 ms 3000.0000 1000.0000 34.57 MB
Default_CodeFormatter_Complex 323.3 ms 9.19 ms 24.86 ms 5000.0000 2000.0000 53 MB

After

Method Mean Error StdDev Median Gen0 Gen1 Allocated
Default_CodeFormatter_Tests 134.6 ms 2.68 ms 7.06 ms 131.8 ms 3000.0000 1000.0000 34.4 MB
Default_CodeFormatter_Complex 283.3 ms 7.92 ms 22.97 ms 273.1 ms 5000.0000 2000.0000 53.01 MB

@TimothyMakkison TimothyMakkison marked this pull request as ready for review October 29, 2025 13:38
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.

1 participant