Suggested Behavior
Use fastjsonschema instead of jsonschema, or even jsonschema-rs. jsonschema-rs claims to be 30x to 390x faster than jsonschema (3x to 7x faster than fastjsonschema).
Why is this needed?
I have an OpenAPI spec that's moderately big, roughly 1.6M and parsing it with OpenAPI takes about 15s on my computer. I unfortunately can't share it, but I can share the profiling on it.
For one-time use it would be fine, but we use it in tests to validate responses, so this adds quite a bit of runtime to tests.
References
This profiling of just loading the OpenAPI yaml file, using OpenAPI.from_file_path("<path>")
The part in blue is jsonschema.
A bit more detail here: x.txt
Would you like to implement a feature?
None