Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgStatusCollector.java @ 694:7efabe0cddcf
Speed up (a) file rename history to minimize file reads; (b) file.isCopy(int) to read metadata for few revisions at once (use pattern assumes earlier revisions are likely to be queried, too); (c) HgIgnore.isIgnored by caching matched initial fragments (to substitute more expensive Matcher.matches with cheaper HashMap.contains)
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Mon, 05 Aug 2013 17:42:10 +0200 |
| parents | 72fc7774b87e |
| children |
comparison
equal
deleted
inserted
replaced
| 693:32b0d19e8aba | 694:7efabe0cddcf |
|---|---|
| 297 r1 = get(rev1); | 297 r1 = get(rev1); |
| 298 r2 = get(rev2); | 298 r2 = get(rev2); |
| 299 | 299 |
| 300 final CancelSupport cs = CancelSupport.Factory.get(inspector); | 300 final CancelSupport cs = CancelSupport.Factory.get(inspector); |
| 301 | 301 |
| 302 | |
| 303 Collection<Path> allBaseFiles = r1.files(); | 302 Collection<Path> allBaseFiles = r1.files(); |
| 304 TreeSet<Path> r1Files = new TreeSet<Path>(allBaseFiles); | 303 TreeSet<Path> r1Files = new TreeSet<Path>(allBaseFiles); |
| 305 for (Path r2fname : r2.files()) { | 304 for (Path r2fname : r2.files()) { |
| 306 if (!scope.accept(r2fname)) { | 305 if (!scope.accept(r2fname)) { |
| 307 continue; | 306 continue; |
