Skip to content

Optimize core processes for large scale CEL #567

@alkidbaci

Description

@alkidbaci

Some processes can be optimized to achieve a better performance overall when using a CEL algo.

E.g. this method in triple_store.py retrieves object properties every time its is called:

def get_object_properties_for_ind(self, ind: OWLNamedIndividual, direct: bool = True) \
        -> Iterable[OWLObjectProperty]:
    properties = set(self.get_object_properties())
    yield from (pe for pe in self.reasoner.ind_object_properties(ind, direct) if pe in properties)

Solution: we can cache the properties and reuse them.

The method ind_object_properties also retrieves all object properties every time its called. The already retrieved object properties can be passed to this method and lower the time overhead.

I believe after a closer inspection more potential optimization can be figured out.

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