Mercurial > hg4j
diff src/org/tmatesoft/hg/repo/HgManifest.java @ 304:85b8efde5586
Use memory-friendly set implementation to canonicalize filenames and nodeids
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 21 Sep 2011 18:26:16 +0200 |
parents | 650b45d290b1 |
children | f9f3e9b67ccc |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgManifest.java Tue Sep 20 04:43:39 2011 +0200 +++ b/src/org/tmatesoft/hg/repo/HgManifest.java Wed Sep 21 18:26:16 2011 +0200 @@ -29,7 +29,7 @@ import org.tmatesoft.hg.internal.DigestHelper; import org.tmatesoft.hg.internal.Experimental; import org.tmatesoft.hg.internal.Lifecycle; -import org.tmatesoft.hg.internal.Pool; +import org.tmatesoft.hg.internal.Pool2; import org.tmatesoft.hg.internal.RevlogStream; import org.tmatesoft.hg.util.Path; @@ -281,17 +281,17 @@ private boolean gtg = true; // good to go private final Inspector inspector; private final Inspector2 inspector2; - private Pool<Nodeid> nodeidPool, thisRevPool; - private final Pool<PathProxy> fnamePool; + private Pool2<Nodeid> nodeidPool, thisRevPool; + private final Pool2<PathProxy> fnamePool; private byte[] nodeidLookupBuffer = new byte[20]; // get reassigned each time new Nodeid is added to pool public ManifestParser(Inspector delegate) { assert delegate != null; inspector = delegate; inspector2 = delegate instanceof Inspector2 ? (Inspector2) delegate : null; - nodeidPool = new Pool<Nodeid>(); - fnamePool = new Pool<PathProxy>(); - thisRevPool = new Pool<Nodeid>(); + nodeidPool = new Pool2<Nodeid>(); + fnamePool = new Pool2<PathProxy>(); + thisRevPool = new Pool2<Nodeid>(); } public void next(int revisionNumber, int actualLen, int baseRevision, int linkRevision, int parent1Revision, int parent2Revision, byte[] nodeid, DataAccess da) { @@ -354,7 +354,7 @@ // (next manifest is likely to refer to most of them, although in specific cases // like commit in another branch a lot may be useless) nodeidPool.clear(); - Pool<Nodeid> t = nodeidPool; + Pool2<Nodeid> t = nodeidPool; nodeidPool = thisRevPool; thisRevPool = t; } catch (IOException ex) {