Subject: Re: [BUG] Long line makes pattern matching (by //) hog Zsh
From: Sebastian Gniazdowski <[email-masked]>
To: Peter Stephenson <[email-masked]>
Cc: Zsh hackers list <[email-masked]>
Date: Sun, 5 Jun 2016 23:21:13 +0200
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On 5 June 2016 at 22:39, Peter Stephenson <[email-masked]> wrote:
> We are maybe being naive in treating [...] expressions as if they are
> "simple".  I think we have better protection against pathological
> backtracking for more complicated patterns.
>
> Does the following help?

It's slower with this patch:

3,02s user 0,02s system 99% cpu 3,064 total
vs
1,55s user 0,24s system 93% cpu 1,909 total

for pattern with first segment removed, i.e.: ([^0-9/\\\\ ]##[^/\\\\]#(#e))

Best regards,
Sebastian Gniazdowski