Closed thoebert closed 1 year ago
Thank for this analysis. What you describe is the original behavior of ModelExtractor. Indeed all tests are still green after the change. Do you have a test case for this because there is currently no test in the project that could enlighten this behaviour.
Pushed now in test branch.
I am using a the Openllet Jena API with an ontology of around n=500 classes. Currently, a usage of the Openllet reasoner is not possible for me since even for specific small queries or API usages the Openllet reasoner first computes a full closure and afterwards filters down to the returned subset. For example, the reasoner internally computes 190 000 disjoint statements (~n^2), between almost every class and EVERY other class, and filters down afterwards. This process takes multiple minutes and is completely unnecessary in my use-case. By changing the
Selector
of theModelExtractor
inmodule-jena/src/main/java/openllet/jena/graph/query/GraphQueryHandler.java:136
fromStatementType.ALL_STATEMENTS
toStatementType.DEFAULT_STATEMENTS
, I was able to stop this behaviour and reduced the computation time to a second.Therefore I was wondering how useful the default value is, or if this property should be a configurable parameter? Maybe a configurable new
OpenlletOption
could be sufficient to tackle this problem?