-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Use ajv.addSchema
to load validation schemas at build
#382
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really good implementation, this seems something we should do anyway.
@mattbishop can you verify this solves your leak? |
Yes I will do so. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent
Pulling this version in my package.json:
|
This version is much more in line with 2.7.13, and I can run my load test without memory failures. It's a good fix for my use case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Checklist
npm run test
andnpm run benchmark
and the Code of conduct
Uses
ajv.addSchema
to load all validation schemas while building the code instead of serializing the schema to an object literal that is eventually passedajv.validate
.Could fix the memory leak discussed in #379