diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2011-01-28 07:16:02 -0800 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2011-01-28 07:20:26 -0800 |
commit | 065a0a8122be356d1f898321763d3518b504b075 (patch) | |
tree | d500c82fde91973d78f6933337c71d8afb4a2607 /org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java | |
parent | c544e96a4cd027a127bc6e6ad5277091b3c0da73 (diff) | |
download | jgit-065a0a8122be356d1f898321763d3518b504b075.tar.gz jgit-065a0a8122be356d1f898321763d3518b504b075.zip |
Revert "Teach PackWriter how to reuse an existing object list"
This reverts commit f5fe2dca3cb9f57891e1a4b18832fcc158d0c490.
I regret adding this feature to the public API. Caches aren't always
the best idea, as they require work to maintain. Here the cache is
redundant information that must be computed, and when it grows stale
must be removed. The redundant information takes up more disk space,
about the same size as the pack-*.idx files are. For the linux-2.6
repository, that's more than 40 MB for a 400 MB repository. So the
cache is a 10% increase in disk usage.
The entire point of this cache is to improve PackWriter performance,
and only PackWriter performance, and only when sending an initial
clone to a new client. There may be better ways to optimize this, and
until we have a solid solution, we shouldn't be using a separate cache
in JGit.
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java index 85864dbbf6..cd3706bbe3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java @@ -46,14 +46,11 @@ package org.eclipse.jgit.lib; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.Iterator; import java.util.List; -import java.util.Set; import org.eclipse.jgit.errors.IncorrectObjectTypeException; import org.eclipse.jgit.errors.MissingObjectException; -import org.eclipse.jgit.revwalk.ObjectListIterator; import org.eclipse.jgit.revwalk.ObjectWalk; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevWalk; @@ -431,35 +428,6 @@ public abstract class ObjectReader { } /** - * Obtain the available pre-computed object reachability lists. - * <p> - * The lists are indexed by commit ObjectId, so the returned set contains - * the commit ObjectIds naming each set. - * - * @return set of commit ObjectIds that identify lists. - */ - public Set<ObjectId> getAvailableObjectLists() { - return Collections.emptySet(); - } - - /** - * Open a pre-computed object list for reading. - * - * @param listName - * a commit ObjectId previously returned by - * {@link #getAvailableObjectLists()}. - * @param walker - * the revision pool to use when looking up objects. - * @return the list iterator. - * @throws IOException - * the reader cannot load the precomputed list. - */ - public ObjectListIterator openObjectList(AnyObjectId listName, - ObjectWalk walker) throws IOException { - throw new UnsupportedOperationException(); - } - - /** * Release any resources used by this reader. * <p> * A reader that has been released can be used again, but may need to be |