[patch] syntax:plain for .hgignore
hg at ostkamp.fastmail.fm
Wed Sep 12 13:54:23 CDT 2007
On Wed, 12 Sep 2007, Jonathan S. Shapiro wrote:
> On Wed, 2007-09-12 at 10:27 -0500, Matt Mackall wrote:
>> # We're using a Python with a tiny regex engine and we
>> # made it explode, so we'll divide the pattern list in two
>> # until it works
>> l = len(pats)
>> if l < 2:
>> a, b = matchfn(pats[:l/2], tail), matchfn(pats[l/2:], tail)
>> return lambda s: a(s) or b(s)
>> Each split means an extra regex test, so it won't take many splits to
>> be slower than string matching.
> Ahh. Okay, this makes a lot of (reluctant) sense. I remain very confused
> about Guido's case, however, because I can't see how a 620
> line .hgignore generated 5000 calls to sre_compile(). Assuming it had to
> split down to individual lines, it shouldn't have been more than 1670
> calls. I am still failing to understand something here.
Would it help if I provided our .hgignore to you by email?
I would however need to obfuscate some pathnames a bit to protect my
employer interests (sorry about this inconvenience), but I think this
would not change test results.
Please let me know whether you want me to do this.
More information about the Mercurial-devel