protegeproject / swrlapi

Java API for working with the SWRL rule and SQWRL query languages
Other
99 stars 40 forks source link

SQWRL queries use LOTS of memory. #40

Open DainTorson opened 6 years ago

DainTorson commented 6 years ago

SQWRL queries use LOTS of memory. Am I doing something wrong? Here is my KnowledgeBase class (I'm using Scala, but I don't think it makes a very big difference):

https://gist.github.com/DainTorson/4cd5deb4e31c7664c4f56d0362d5d1d5

When I'm trying to extract approximately one hundred values, the program uses 6+ gb of memory and I eventually end up with OutOfMemoryError. Even several data extraction operations increase memory usage up to 500+Mbs. Am I using the API in the wrong way?

martinjoconnor commented 6 years ago

Running a SQWRL query activates reasoning (via an OWL 2 RL-based reasoner [1]). I would increase your memory size if possible.

[1] https://github.com/protegeproject/swrlapi/wiki/OWL2RLTab