Skip to content

Conversation

@lahma
Copy link
Collaborator

@lahma lahma commented May 1, 2025

  • remove LINQ, reduce duplicate checks
  • don't recurse strings or primitive types

Using my custom large (1,3MB) swagger file.

Before

Method Mean Error StdDev Gen0 Gen1 Gen2 Allocated
GenerateFile 106.9 ms 2.08 ms 2.56 ms 6500.0000 3500.0000 500.0000 74.28 MB

After

Method Mean Error StdDev Gen0 Gen1 Allocated
GenerateFile 86.33 ms 1.454 ms 1.215 ms 5000.0000 2000.0000 67.83 MB

* remove LINQ, reduce duplicate checks
* don't recurse strings or primitive types
@lahma lahma merged commit f68e664 into RicoSuter:master May 1, 2025
2 checks passed
@lahma lahma deleted the optimize-AsyncJsonReferenceVisitorBase branch July 24, 2025 08:46
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