Mercurial > jhg
comparison src/org/tmatesoft/hg/internal/ChangelogHelper.java @ 381:6e37c7168585
IntMap is more effective than TreeMap<Integer,...>
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 09 Feb 2012 19:07:29 +0100 |
parents | 2fadf8695f8a |
children | 9c9c442b5f2e |
comparison
equal
deleted
inserted
replaced
380:9517df1ef7ec | 381:6e37c7168585 |
---|---|
14 * the terms of a license other than GNU General Public License | 14 * the terms of a license other than GNU General Public License |
15 * contact TMate Software at support@hg4j.com | 15 * contact TMate Software at support@hg4j.com |
16 */ | 16 */ |
17 package org.tmatesoft.hg.internal; | 17 package org.tmatesoft.hg.internal; |
18 | 18 |
19 import java.util.TreeMap; | |
20 | |
21 import org.tmatesoft.hg.core.HgInvalidControlFileException; | 19 import org.tmatesoft.hg.core.HgInvalidControlFileException; |
22 import org.tmatesoft.hg.repo.HgChangelog.RawChangeset; | 20 import org.tmatesoft.hg.repo.HgChangelog.RawChangeset; |
23 import org.tmatesoft.hg.repo.HgDataFile; | 21 import org.tmatesoft.hg.repo.HgDataFile; |
24 import org.tmatesoft.hg.repo.HgInternals; | 22 import org.tmatesoft.hg.repo.HgInternals; |
25 import org.tmatesoft.hg.repo.HgRepository; | 23 import org.tmatesoft.hg.repo.HgRepository; |
31 * @author TMate Software Ltd. | 29 * @author TMate Software Ltd. |
32 */ | 30 */ |
33 public class ChangelogHelper { | 31 public class ChangelogHelper { |
34 private final int leftBoundary; | 32 private final int leftBoundary; |
35 private final HgRepository repo; | 33 private final HgRepository repo; |
36 private final TreeMap<Integer, RawChangeset> cache = new TreeMap<Integer, RawChangeset>(); // FIXME use IntMap instead | 34 private final IntMap<RawChangeset> cache = new IntMap<RawChangeset>(32); |
37 private String nextCommitAuthor; | 35 private String nextCommitAuthor; |
38 | 36 |
39 /** | 37 /** |
40 * @param hgRepo | 38 * @param hgRepo |
41 * @param leftBoundaryRevision walker never visits revisions with local numbers less than specified, | 39 * @param leftBoundaryRevision walker never visits revisions with local numbers less than specified, |