Disable Jena IRI/literal validation by default#204
Merged
niegrzybkowski merged 5 commits intomainfrom Aug 25, 2025
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #196
Validating IRIs and literals can take up even ~30–40% of runtime in
rdf to-jelly. Most of the time we don't need that at all, because we only care about converting between formats, and not the validity of IRI schemas, or whether 30th February is a real date or not.This disables validation by default in
to-jellyandfrom-jellycommands, with the largest benefit being in the second case. Jelly by itself already bypasses some of these validations.Lazy mapping of literals into value space should be fine, but we can't easily enable that from outside of Jena. I wrote a small routine using reflection to fix that. It may fail if reflection is not supported – e.g., if the JVM doesn't support it, or when Graal is misconfigured. We detect that and ignore it – the program will still work. You can run
jelly-cli versionto see if reflection (and, thus, maximum speed) is available on your platform.Tested this with assist-iot-weather, 100K elements:
Baseline:
So, we are way faster on to-jelly, and slightly faster on from-jelly.