Skip to content

eye becomes slow when forward rules produce formulae #155

@tpluscode

Description

@tpluscode

I have a bunch (12 ATM) of uncomplicated rules and a fairly small input dataset (12 MB). I want to produce a trig file containing multiple graphs.

For that, I tried to wrap the output of each rule in a graph statement like

{
  ?brochure lib:brochureId ?brochureId .
  ?brochure Source:FolderName ?title .
} => {
+ ?brochureId sem:quotedGraph {
    ?brochureId a wikibus:Brochure .
    ?brochureId schema:name ?title .
+ }
} .

I noticed that the process becomes increasingly slow with each rule modified in this way and the CPU usage of swipl skyrockets.

Without sem:quotedGraph - 11s
1 rule with sem:quotedGraph - 22s
2 rules - 52s
3 rules - 57s
4 rules - 109s
...

I changed my rules top-down. Seems like each rule has a different impact but the overall trend is clear.

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