Skip to content

Improve performance of ASK and POST knowledge interactions by reusing ReasonerProcessor. #544

@bnouwt

Description

@bnouwt

Currently, every time a Knowledge Interaction is activated the ReasonerProcessor is recreated and part of this process is the costly graph pattern matching algorithm. Under certain circumstances (i.e. when the network is stable), the ReasonerProcessor can be reused which improves the performance considerably.

Doing a quick and dirty and naive implementation of this in the InteractionProcessorImpl where we reuse the ReasonerProcessor object when encountering the same KnowledgeInteraction object shows that for the TestPostReactPerformance test where the same knowledge interaction is repeated 1000 times it improved the performance per interaction from 9.5ms to 4.5ms. So, almost twice as fast.

So, this is an obvious place to further improve the performance of the knowledge engine when the network is (quite) stable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions