Mercurial > hg4j
changeset 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 | 9517df1ef7ec |
children | 82336b7c54f4 |
files | src/org/tmatesoft/hg/internal/ChangelogHelper.java |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/ChangelogHelper.java Thu Feb 09 18:57:14 2012 +0100 +++ b/src/org/tmatesoft/hg/internal/ChangelogHelper.java Thu Feb 09 19:07:29 2012 +0100 @@ -16,8 +16,6 @@ */ package org.tmatesoft.hg.internal; -import java.util.TreeMap; - import org.tmatesoft.hg.core.HgInvalidControlFileException; import org.tmatesoft.hg.repo.HgChangelog.RawChangeset; import org.tmatesoft.hg.repo.HgDataFile; @@ -33,7 +31,7 @@ public class ChangelogHelper { private final int leftBoundary; private final HgRepository repo; - private final TreeMap<Integer, RawChangeset> cache = new TreeMap<Integer, RawChangeset>(); // FIXME use IntMap instead + private final IntMap<RawChangeset> cache = new IntMap<RawChangeset>(32); private String nextCommitAuthor; /**