diff 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
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;
 
 	/**