nickdrummond / star-wars-ontology

An OWL ontology describing events, characters and places in the Star Wars Universe
https://nickdrummond.github.io/star-wars-ontology/
3 stars 1 forks source link

Resolve serious performance issues with navigating classified ontology #3

Closed nickdrummond closed 2 years ago

nickdrummond commented 2 years ago

1 1/2 minutes to select Hera once classified on test.owl!

nickdrummond commented 2 years ago

Instant when active ont is "star-wars"

nickdrummond commented 2 years ago

Locks up when active ont is "rebels"

nickdrummond commented 2 years ago

Other Twi'Leks are responsive - just Hera as she's very central to the ontology

Ezra is even slower

nickdrummond commented 2 years ago

The number of inferred relations to events through "participatedIn" etc is very high for these individuals. Removing the named inverses of the "participated" property tree solves the problem, but we lose some nice visibility of events from a character perspective. There are also a number of assertions that directly use these inverse properties that would need to be reworked.

nickdrummond commented 2 years ago

Even if we do this, it will be slow to query for the events "Event and participant value Ezra_Bridger" > 30s And you lose the "detail" - eg "captured During..."

nickdrummond commented 2 years ago

Putting a load of disjoints in (clumsily) does not seem to make any notable difference

nickdrummond commented 2 years ago

Pellet is currently taking a good while to classify anyhow: test.owl = Ontologies processed in 24098 ms by Pellet

nickdrummond commented 2 years ago

DL query on test.owl

"Event and participant value Ezra_Bridger"

Computed results for Subclasses in 106 ms Computed results for Instances in 57351 ms

76 results

nickdrummond commented 2 years ago

Pellet is currently taking a good while to classify anyhow: test.owl = Ontologies processed in 24098 ms by Pellet

Substantially reduced the classification time that had crept up to almost 38s by moving characterisation of species out of the core ontologies. But this does not impact the DL query = 66686 ms

nickdrummond commented 2 years ago

Being really specific about the type of event massively speeds things up

Mission and... = 2866 ms

Or, specifying all Events is almost instant (8ms) so its not a problem with protege/memory - its classification

nickdrummond commented 2 years ago

Also quick: Event and participant some Human

Very slow: Arrival and participant value Ezra_Bridger Which must be an issue with one of: 1 Smuggled onto Lothal 2 Massassi group arrive at Atollon 3 Reunion of Spectres on Yavin 4

Even navigating to 1 causes PRotege to grind to a halt - perhaps this is why the SPectres have these slow load times. It has an exact cardi

participant exactly 6 (({Chopper , Ezra_Bridger , Garazeb_Orrelios , Hera_Syndulla , Kanan_Jarrus , Sabine_Wren}) and (disguisedAs some Civilian))

Pulling this out into individual assertions completely solves the problem:

participant some (({Ezra_Bridger}) and (disguisedAs some Civilian))

nickdrummond commented 2 years ago

Checked other classes that used cardi - some take a good time to load eg Senate hostage crisis Can't see any obvious pattern so just re-phrasing them to avoid the cardi

nickdrummond commented 2 years ago

Takes 1s to query for Ezra = 75 events Event and (participant value Ezra_Bridger)

Still takes 28s to get full picture = 104 events Event and ((participant value Ezra_Bridger) or (included some (participant value Ezra_Bridger)))