-
Notifications
You must be signed in to change notification settings - Fork 65
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
Change tripleTemplate
rule to an equivalent non-recursive definition
#1816
Change tripleTemplate
rule to an equivalent non-recursive definition
#1816
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1816 +/- ##
==========================================
+ Coverage 90.12% 90.14% +0.02%
==========================================
Files 399 399
Lines 38200 38188 -12
Branches 4280 4280
==========================================
- Hits 34429 34426 -3
Misses 2473 2473
+ Partials 1298 1289 -9 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a small suggestion, That looks really promising.
Conformance check passed ✅No test result changes. |
|
In the original
SPARQL
grammar, thetripleTemplate
rule is defined recursively. This leads to stack overflows in the ANTLR-v4 based parser for large inputs, in particular largeINSERT DATA
requests. This PR changes the definition of thetriplesTemplate
to an equivalent formulation that is not recursive. This massively improves the performance of parsing large triple payloads. With this change we can process the whole olympics dataset as a singleUPDATE
request (1.78M triples, 323M).To test this,
curl
with--data-binary
can be used. Prepare the Update to execute into a filefoo
. Execute the query withcurl --data-binary @foo ...
. Some more info on the different curl options.