]> source.dussan.org Git - jgit.git/commit
Don't use java.util.regex for two simple wildcard cases 44/36144/3
authorAndrey Loskutov <loskutov@gmx.de>
Fri, 7 Nov 2014 15:30:44 +0000 (16:30 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 18 Nov 2014 09:58:26 +0000 (10:58 +0100)
commit2c940fa18a457c37e9aa7a8065e8d650c83589e2
tree80770201657b1db088d556bb97adf582f271e509
parenta31db826d4247d1ae91a243526bcb65423abafce
Don't use java.util.regex for two simple wildcard cases

To improve ignore parser performance we can avoid using java.util.regex
code on simple wildcard patterns with leading or trailing asterisk. As
those patterns represent a majority of ignore rules, the index diff
performance can be drastically increased on huge repository with lot of
ignore rules.

Bug: 450466
Change-Id: I80428441cc8d5de5468813f841d89322413eed8b
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/FastIgnoreRuleTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreMatcherParametrizedTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreRuleSpecialCasesTest.java
org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/LeadingAsteriskMatcher.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/PathMatcher.java
org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/Strings.java
org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/TrailingAsteriskMatcher.java [new file with mode: 0644]