Open niniemann opened 6 years ago
Small addition:
clearInference(): Removes all statements infered by this model. This can be useful if the parent model has been changed without informing the inference model and statements have been removed.
Does this imply that we have to use "clearInference()" when removing statements from the parent model? And "performInference()" alone is only okay if nothing was removed, only added?
initial situation
Rule: [equivalentSymmetric: (?a owl:equivalentClass ?b) -> (?b owl:equivalentClass ?a)]
Model: (foo owl:equivalentClass bar) (bar owl:equivalentClass foo) << inferred
what I did
remove the first statement
what happened
Model: (foo owl:equivalentClass bar) << inferred (bar owl:equivalentClass foo) << inferred
what to do?
The commit 01e2f4b20402ba325a71b6dca82b0a3a13e84f45 fixes this problem for my special use case, but makes everything slower -- every insert and removal takes longer, as well as every sparql query. Where before only the first query was slow, and all removals/insertions were fast.
The problem seems to be the consecutive call of performInference(), which is still called when rules are added/removed! The documentation says this should be fine, though:
I don't really know how to solve this yet, or why it's so slow...