[
https://issues.apache.org/jira/browse/JENA-279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13419026#comment-13419026
]
Andy Seaborne commented on JENA-279:
If we keep the cache, the use of soft references looks interesting.
That said, I am in favour of removing the cache based on my last poking around
in this area but it was about a year ago. It is a relic of a time when object
creation was relatively more expensive in Java (from what I remember - it was a
long time ago!) and the usage of Jena may well have been different.
TDB does it's own thing because it is caching the node file and the cache is
NodeId to Node.
RIOT, for IRIs, does it's own thing because it is coupled with caching IRI
parsing which is expensive.
ARQ does itself create nodes - it used nodes from the storage layer.
I have just a simple test: parsing BSBM 25m
With cache:
bsbm-25m.nt.gz : 183.27 sec 25,000,250 triples 136,415.85 TPS
Without cache:
Node.cache(false) ;
bsbm-25m.nt.gz : 179.19 sec 25,000,250 triples 139,514.99 TPS
(On an Ubuntu desktop machine with Java 6 inside Eclipse.)
Parsing is one of the places nodes get created a lot.
The rules engine does not do much node creation - it create triples.
This big step in terms of architecture so I'll highlight the issue to the dev@
list. We can tap the historical record of the project.
Make node cache configurable and use soft references
Key: JENA-279
URL: https://issues.apache.org/jira/browse/JENA-279
Project: Apache Jena
Issue Type: Improvement
Components: Jena
Affects Versions: Jena 2.7.2
Reporter: Laurent Pellegrino
Assignee: Stephen Allen
Labels: jena-core, node, node-cache
Attachments: nodecache-279.patch
It would be nice to offer the possibility to configure the NodeCache capacity
and to use soft references in order to collect references when no more memory
is available. The Node cache should not be the cause of an OutOfMemory error.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira