Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR adds
org.monarchinitiative.phenol.graph.csr.mono.CsrMonoOntologyGraph
, an implementation of anOntologyGraph
that stores just one edge type in a CSR-like structure.CsrMonoOntologyGraph
becomes the default implementation used inOntology
andMinimalOntology
that are loaded byphenol-io
.It fixes #444 since the graph only stores one edge type, which is what we need for most of our current work anyway.
Next, the PR sets up benchmarks using Java Mircrobenchmark Harness. The benchmark shows a significant performance improvement for getting parents and children of a term.
@julesjacobsen do you think you can skim
CsrMonoOntologyGraph
and the benchmark setup if they look reasonable? The biggest performance gain was actually achieved by using aMap
to get index of a node instead of the binary search..The performances of the ancestor/descendant traversals are not too impressive though. I am not sure if/how these can be improved, at least without a lot of work.
My overall aim is to wrap as many loose ends on Phenol as possible and make this, hopefully, also useful to you. So, if I will appreciate any comments if you have some time for this..
Thanks a lot!