Mercurial > jhg
diff src/org/tmatesoft/hg/internal/ChangelogHelper.java @ 140:1c1891ad1c73
Slight optimization
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 16 Feb 2011 22:33:04 +0100 |
parents | 4a948ec83980 |
children | ba2bf656f00f |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/ChangelogHelper.java Wed Feb 16 22:28:29 2011 +0100 +++ b/src/org/tmatesoft/hg/internal/ChangelogHelper.java Wed Feb 16 22:33:04 2011 +0100 @@ -33,6 +33,7 @@ private final int leftBoundary; private final HgRepository repo; private final TreeMap<Integer, Changeset> cache = new TreeMap<Integer, Changeset>(); + private String nextCommitAuthor; /** * @param hgRepo @@ -74,6 +75,9 @@ } public String getNextCommitUsername() { - return new HgInternals(repo).getNextCommitUsername(); + if (nextCommitAuthor == null) { + nextCommitAuthor = new HgInternals(repo).getNextCommitUsername(); + } + return nextCommitAuthor; } }