arne-bdt opened a new issue, #3226:
URL: https://github.com/apache/jena/issues/3226
### Version
5.5.0-SNAPSHOT
### Feature
When loading and processing graphs, we often do not need the pattern
matching operations at first.
For example, when we load a bunch of graphs and calculate delta graphs.
Also when we only convert graphs, the pattern matching operations are
usually not needed.
Since GraphMem2Roaring uses one single data structure for all the triples
and separate maps of RoaringBitmaps as indices for pattern matching, it is
quite easy to implement lazy indexing for this in-memory graph.
I suggest to extend the RoaringTripleStore to support the following indexing
strategies:
- EAGER - starts with all indices as any other in-memory graph
- AUTOMATIC - starts without the indices but automatically initializes them
when pattern matching is required
- MANUAL - starts without the indices and throws an exception when pattern
matching is needed but no index is present
The following methods should be added to the graph / triple store:
- #getIndexingStrategy - returns the current indexing strategy
- #clearIndex - sets the indices to null
- #initIndex - rebuilds the index and from there on, the index is kept up to
date with each #add and #remove
The GraphMem2Roaring would internally use the EAGER strategy, but I would
add a new class GraphMem2RoaringLazyIndexing, which uses AUTOMATIC as default,
but has a constructor which would take any strategy.
Benefits:
- as long as there is no index for pattern matching:
--> #add and #remove are extremely fast
--> the memory footprint of the graph is only a fraction, compared to any
other GraphMem2 implementation
Would this be useful for the project?
### Are you interested in contributing a solution yourself?
Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]