Reasoning slows down over runtime

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Reasoning slows down over runtime

jayson
Hello Together,

within my current project, I am calling a reasoner several hundreds of times or more
since it is called within a pipeline. Also, the results of a reasoning process are manipulated
and used as the input for the next reasoning process.

Initially, one reasoning call takes 2.3 sec. and with time and reasoner calls it can
take up to approx. 80 sec. per call.

What I tried so far is destroy inferences, but it does not solve the issue.

        onto_inferred = get_ontology("http://inferrences/")
        onto_inferred.destroy()

Do you by any chance have an idea, what causes this behavior?

What kind of further information do I need to provide?

Best regards,
Jayson
Reply | Threaded
Open this post in threaded view
|

Re: Reasoning slows down over runtime

Jiba
Administrator
Hello,

By default, the reasoning is performed over ALL created and loaded ontologies. So if you load or create more and more ontologies, reasoning will be slower and slower.

You can avoid this by specifying the desired ontology(ies) when calling the reasoner, or by destroying unused ontologies, or by using World to isolate the various ontologies (probably the more radical approach, but not always possible).

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Reasoning slows down over runtime

jayson
Hello Jiba,

thank you for that insightful answer, I am glad, that the behavior is explanable.

The thing is I have 1 big ontology in various domain specific files.

It is possible or does it make sense so separate the ontology in different worlds?
Does it make sense to destroy the ontology and load it again when the reasoner
is called again?

Do you have a proposal to solve this issue, because I am currently confused how to deal with it.

Best regards,
Jayson
Reply | Threaded
Open this post in threaded view
|

Re: Reasoning slows down over runtime

Jiba
Administrator
Hello,

> It is possible or does it make sense so separate the ontology in different worlds?

If the various parts of the ontology are independent (for the reasoning purpose), yes. If they are not independent, you cannot separate them.


> Does it make sense to destroy the ontology and load it again when the reasoner is called again?

I think it makes sense if the ontology is modified and enriched with new facts, that are not needed for the next reasoning processes.

Jiba