owlcs / owlapi

OWL API main repository
822 stars 315 forks source link

java.lang.OutOfMemoryError: Java heap space error #1033

Closed OmkarKatkade closed 2 years ago

OmkarKatkade commented 2 years ago

Hello Team,

I have a feature where I need to get subclasses of a particular class. I am using reasoner to get the same. The code for the same is something like this:

Set set1 = reasoner.getSubClasses(parentClass, false).getFlattened();

This particular line of code is taking a lot of time(probably because of the HashSet) and gave me the Heap space error. For now, I have increased the heap space for the project but I would like to understand if there is a better solution to this issue. Also, the project I am working on uses 3.4.10 version of OWLAPI.

Thank you.

ignazio1977 commented 2 years ago

Hi, While it's possible that there's a memory issue in the OWLAPI, in scenarios like these we've always found ontology and reasoner implementation to be the deciding factors in memory requirements. Can you add information about those?