-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
encoding/jsonschema: use allowedTypes in if/then/else constraints
Unlike, `allOf` and friends, the `if/then/else` logic was not benefiting from the fact that we can eliminate some elements from the disjunctions created in the subschemas. By doing this, we improve performance in some schemas by quite a bit (for example, it improved vet time on one of the SchemaStore schemas [1] by 40%). [1] https://github.com/SchemaStore/schemastore/blob/64f44fd870573eff20d44582f83edac5907e543e/src/schemas/json/dependabot-2.0.json Signed-off-by: Roger Peppe <[email protected]> Change-Id: I0e4aca10c1bec02cb6820db1c17953b21bd29760 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1202609 TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
- Loading branch information
Showing
5 changed files
with
45 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters