On 06/04/13 10:37, Tilo Fischer wrote:
Hi,

I would like to reduce the memory that is used by my application for
the GenericRuleReasoner.
Are there already measures like PATRICIA tries or dictionaries in Jena
that aim to store the nodes' content (Node.label) in one place instead
of in every node? Or are there reasons why this cannot be accomplished?

Thanks, Tilo Fischer

Jena stores the string as given for the literals/URI. Whether there is shared string reuse is dependent on how the nodes are made. E.g. RIOT uses an LRU cache on IRIs to both increase sharing and reduce the re-resolving of URIs; there isn't such a space-saving cache for literals (won't be a bad idea to have one but the savings may not be that great unless there is lots of repeats. Numbers often repeat, xsd strings don't).

TDB and SDB do use dictionaries.

I don't believe the rules engine actually makes nodes, just triples, so the size of the nodes (terms) is fixed by the base data.

There can be a lot of space going into maintaining the state of the rules engine. I think this can end up being comparable to the size of the base data.

What are you running up against?
Which route is the data taking to get into the rules engine?

        Andy



Reply via email to