-
Notifications
You must be signed in to change notification settings - Fork 30
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
Replace usage of $ref with tag #268
Comments
$ref
with tag
😮 🎉 Worth trying in a PR. The 2nd form also looks like it does not depend on the referenced tag schema to be co-located with the first. Can one use an
Is this something that could increase performance for |
The
I don't think they're interchangeable -- the |
I think this would increase performance of the 1.x schemas. It may or may not be worthwhile to release another 1.x ASDF Standard just for that improvement. Now that we have the option to disable |
Typically when a core schema references another, we tack on the entire referenced schema with
$ref
. Here's an example from asdf-1.1.0:Here's a loose outline of how the library handles this schema:
$ref
, the nested software-1.0.0 object is validated here.Notice how the software-1.0.0 object is being validated twice? Due to an extension we made to JSON schema in our yaml-schema/draft-01 metaschema, we have another way to express this relationship:
This schema validates the tag of the object assigned to
asdf_library
but not the object's content. The content of the software-1.0.0 object will still be validated when the library recognizes its tag.Should we switch the core schemas to the second form? Since validation is the slowest part of reading a file, it may improve performance significantly to avoid validating each object twice (or more, if references are nested more than 1 deep.
The text was updated successfully, but these errors were encountered: