]> source.dussan.org Git - jgit.git/commit
Implement async/batch lookup of object data 22/1222/4
authorShawn O. Pearce <spearce@spearce.org>
Sun, 1 Aug 2010 03:08:10 +0000 (20:08 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Sat, 21 Aug 2010 00:41:27 +0000 (17:41 -0700)
commitf048af3fd19547d3692f5df968571ffd7556b688
treec447126e0503035dd7cf2a57db852e8083470606
parent11a5bef8b1c866fadc9b340a1300c7fdd927a46b
Implement async/batch lookup of object data

An ObjectReader implementation may be very slow for a single object,
but yet support bulk queries efficiently by batching multiple small
requests into a single larger request.  This easily happens when the
reader is built on top of a database that is stored on another host,
as the network round-trip time starts to dominate the operation cost.

RevWalk, ObjectWalk, UploadPack and PackWriter are the first major
users of this new bulk interface, with the goal being to support an
efficient way to pack a repository for a fetch/clone client when the
source repository is stored in a high-latency storage system.

Processing the want/have lists is now done in bulk, to remove
the high costs associated with common ancestor negotiation.

PackWriter already performs object reuse selection in bulk, but it
now can also do the object size lookup and object counting phases
with higher efficiency.  Actual object reuse, deltification, and
final output are still doing sequential lookups, making them a bit
more expensive to perform.

Change-Id: I4c966f84917482598012074c370b9831451404ee
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/lib/AsyncObjectLoaderQueue.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/lib/AsyncObjectSizeQueue.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/lib/AsyncOperation.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/AsyncRevObjectQueue.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/DeltaWindow.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/ObjectToPack.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java