-
Notifications
You must be signed in to change notification settings - Fork 91
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
Extremely long validation time for complex object #39
Comments
There's of course something very wrong going on in there - I'll look for a fix and let you know. |
@bzuillsmith can you give me a test-case with a schema you're testing against? Seems like inner properties of ObjectID() are being validated with your schema and that's causing the delay but I can't say for sure until I see the schema. |
Below is an example test based on a subset of one of our use cases. Usually we add On my machine, async validation takes 232ms and sync takes 200ms.
|
@bzuillsmith here's the testcase I put together: ac4ed8c I didn't notice any major difference with using ObjectID against using simple object. Btw on my computer validation over 10000 objects (I increased from your original five) took about 250ms in sync mode and 400ms in async mode. Can you please try to run the testcase on your machine? Just clone the repo and do
|
Confirmed solved in ac4ed8c#commitcomment-6674756 |
Okay, if I validate this object it takes <1 ms.
If I validate this object, it takes 32ms. What is happening that the ObjectID adds 31 ms processing time? Processing time goes up linearly, the more ObjectID's it has to check. Sometimes I need to check arrays of objects with ObjectIDs and that gets outrageous.
The text was updated successfully, but these errors were encountered: