Perf: Use SPARQL VALUES for model ID restrictions - #193
Merged
Conversation
mdorf
marked this pull request as ready for review
July 15, 2026 22:21
This was referenced Jul 20, 2026
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.
Summary
VALUESclauses on AllegroGraph, Virtuoso, and GraphDB.FILTERimplementation for 4store, which acceptsVALUESsyntax but does not apply the restriction.Implements #191.
Verification
test:where: 26 runs, 472 assertionsPerformance
Measured from a local API process (Ruby 3.2.10) against the staging AllegroGraph instance containing production-equivalent data. The comparison used Goo
developmentatcc806c8and this branch atcb0b87b.For each exact 500-ID SPARQL query, the benchmark used 5 warmups followed by 50 alternating measured requests per revision over persistent HTTP connections. The before/after result bindings were identical.
An end-to-end UBERON API benchmark (3 warmups, 20 alternating measured requests per revision) was effectively flat: median response time was 732.1 ms before and 736.9 ms after.
The measured benefit is therefore a consistent 6.8–8.5% reduction in generated query size and about a 2% improvement in query median latency for these workloads. Tail latency was mixed, and this benchmark does not demonstrate a material end-to-end API speedup.