[PATCH 5 of 6 V2] match: avoid translating glob to matcher multiple times for large sets

Martin von Zweigbergk martinvonz at google.com
Fri Nov 23 03:00:36 EST 2018


On Thu, Nov 22, 2018 at 11:44 PM Martin von Zweigbergk <
martinvonz at google.com> wrote:

>
>
> On Thu, Nov 22, 2018 at 2:26 PM Boris Feld <boris.feld at octobus.net> wrote:
>
>> # HG changeset patch
>> # User Boris Feld <boris.feld at octobus.net>
>> # Date 1542916922 -3600
>> #      Thu Nov 22 21:02:02 2018 +0100
>> # Node ID 018578f3ab597d5ea573107e7310470de76a3907
>> # Parent  4628c3cf1fc1052ca25296c8c1a42c4502b59dc9
>> # EXP-Topic perf-ignore-2
>> # Available At https://bitbucket.org/octobus/mercurial-devel/
>> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r
>> 018578f3ab59
>> match: avoid translating glob to matcher multiple times for large sets
>>
>> For hgignore with many globs, the resulting regexp might not fit under
>> the 20K
>> length limit. So the patterns need to be broken up in smaller pieces.
>>
>
> Did you see 0f6a1bdf89fb (match: handle large regexes, 2007-08-19)
> and 59a9dc9562e2 (ignore: split up huge patterns, 2008-02-11)? It might be
> worth trying to figure out what Python versions those commits are talking
> about. Maybe we've dropped support for those versions and we can simplify
> this code.
>

Oh, and what made me do the archaeology there was that you seem to have
lost the handling of OverlowError from the regex engine. As I said above, I
suspect that's fine because we no longer support some very old Python
versions (but please try to figure out what version that refers to). Still,
if we decide to drop that OverflowError handling, I'd prefer to see that in
an explicit commit early in this series.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20181123/1d8f860b/attachment.html>


More information about the Mercurial-devel mailing list