Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
very poooor performance when debugger attached #669
I'm using NJSonSchema indirectly by using NSwag.
If there is no debugger (=VS2017 15.6) attached then generating swagger.json takes 2-3 seconds (still way too slow, Swashbuckle takes a fraction of a second for the very same app).
If the debugger is attached then the same thing takes 4-5 MINUTES !!
It took my some time to notice that the event log of Diagnostic Tools was flooded with
Since the only caller of
I know there is still a lot of potential to improve performance - right now some things are not really optimized for speed. I think most of the time is used for $ref resolution (JsonPathUtilities) because it has to scan the whole graph (even multiple times). But yes, FileExistsAsync and all these file APIs should not use Task.Run but directly call the sync methods...
Can you create a PR?
I don't see why File.Exists isn't cached, see