a14n commented on issue #1670: URL: https://github.com/apache/jena/issues/1670#issuecomment-1348992693
I think I found the bug. It is located at https://github.com/apache/jena/blob/b0f24f4b9dc3860db67e69fc1161db661785191d/jena-core/src/main/java/org/apache/jena/ontology/impl/OntClassImpl.java#L1002 If we reach this `return` the surrouding foreach does not fully iterate the StmtIterator `i` and it will remain unclosed. This causes a leak in `LPBRuleEngine.activeInterpreters`. With the following patch the perf problem disappears : ```diff --- a/jena-core/src/main/java/org/apache/jena/ontology/impl/OntClassImpl.java +++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/OntClassImpl.java @@ -999,6 +999,7 @@ public class OntClassImpl } else if (!canProveSuperClass( domain )) { // there is a class in the domain of p that is not a super-class of this class + i.close(); return false; } } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
