GitHub user afs opened a pull request:
https://github.com/apache/jena/pull/306
Algorithms for JENA-1414
This PR rstructures `GraphUtil.deleteFrom` to put the decision on whether
to loop on the target (_dst_) graph or the source (_src_) graph.
There are 3 algorithms for discussion:
1. Use the size of the graphs - this is the current Jena 3.5.0 policy
2. Use the size of the _src_ and iterate on the _dst_ to compare sizes
3. Iterator on both _src_ and _dst_ to compare sizes. `Graph.size` is not
used at all.
The cost of `Graph.size()` can be small (already known) or large (needs to
be calculated to be accurate). The latter is bad for large persistent graphs.
The PR also adds javadoc to explain how to call a specific algorithm (_src_
loop or _dst_ loop).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/afs/jena graph-deleteFrom
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/jena/pull/306.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #306
----
commit 7faca15490448af1679f2705ad820f0baa7f1efe
Author: Andy Seaborne <[email protected]>
Date: 2017-11-11T20:10:51Z
Algorithms for JENA-1414
----
---