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

provide a bundled schema containing all metaschemas for a draft #62

Open
karenetheridge opened this issue Nov 29, 2021 · 3 comments
Open

Comments

@karenetheridge
Copy link
Owner

This should make evaluation of a large document against its schema much faster.

We need to do this right in JSM (i.e. for everyone, all the time) because of circularity issues.
therefore, the update-schemas script should do the bundling for us, and we can update CACHED_METASCHEMAS to point all URIs to the same bundle file.

@karenetheridge
Copy link
Owner Author

This can't happen until the spec is changed to allow the $vocabulary keyword to appear at a non-document root.

@karenetheridge
Copy link
Owner Author

I did this in a side branch and it seems to be slower, so I'm probably not going to release this.

@karenetheridge karenetheridge unpinned this issue Apr 27, 2022
@karenetheridge
Copy link
Owner Author

I should try again - instead of simply bundling the subschemas in $defs and continuing to $ref to them as normal, I can inline the schemas directly in the main allOf. This should be substantially better, since the ref resolution -> loading the new schema from the resource index -> evaluating at the new location is the time-consuming bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant