Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validator takes too long to validate JSON. #89

Closed
vladimeeer opened this issue Nov 15, 2013 · 3 comments
Closed

Validator takes too long to validate JSON. #89

vladimeeer opened this issue Nov 15, 2013 · 3 comments

Comments

@vladimeeer
Copy link

Hi there,

I am wondering how performance of validator could be improved? Validation on big hash takes ~ 30 minutes.. I am thinking of using google_hash inside of validator. Any tips on making it faster?

Cheers!

@apsoto
Copy link
Contributor

apsoto commented Nov 15, 2013

Wierd, only thing I can think of is you are referencing lots of external schemas and that makes network calls, which are timing out, or just performing poorly?

A fix for #65 , allowing some sort of pluggable network resolution to skip making network calls might help. However that doesn't really fix anything for you at the moment.

@vladimeeer
Copy link
Author

The slowest part of validation is searching thru array of a lot of keywords and make sure it does not contain some specific ones.

"not": {"enum": ["", "keyword", "sky"]}

It's rule that makes it extremely slow. Validation takes ~1 minute without that rule.

@hoxworth
Copy link
Contributor

hoxworth commented Jan 1, 2014

I just released 2.1.5, which treats enums as a hash internally, so hopefully this portion should be sped up a bit. Try it out and let me know.

@hoxworth hoxworth closed this as completed Jan 1, 2014
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

No branches or pull requests

3 participants