ajv complie performance #3314
chunlampang
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
querySyntax
is repeating the JSON content, which case the result JSON string very large and take a long time to complie.Solution
Use
Type.Ref
feathers/packages/typebox/src/index.ts
Lines 166 to 197 in a21b2cf
Improvement: use
Type.Ref
The following code changed $and, $or to use Ref.
This improvement can also apply to $gte, $gt etc
Difficulty
The
ajv
instance inside the above sample is came from validators.ts which is outside the library. May need to redesign.Beta Was this translation helpful? Give feedback.
All reactions