zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [BUG] Long line makes pattern matching (by //) hog Zsh
Date: Sun, 5 Jun 2016 23:21:13 +0200	[thread overview]
Message-ID: <CAKc7PVDtANU9JPOEsTwY=r=b4b+OEZsXL1CZ=qFB7N-rP9WdXA@mail.gmail.com> (raw)
In-Reply-To: <20160605213951.4af7294a@ntlworld.com>

On 5 June 2016 at 22:39, Peter Stephenson <p.w.stephenson@ntlworld.com> 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


  reply	other threads:[~2016-06-05 21:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-05 14:36 Sebastian Gniazdowski
2016-06-05 19:10 ` Bart Schaefer
2016-06-05 19:37   ` Peter Stephenson
2016-06-05 20:39     ` Peter Stephenson
2016-06-05 21:21       ` Sebastian Gniazdowski [this message]
2016-06-06  0:07     ` Bart Schaefer
2016-06-05 19:47   ` Sebastian Gniazdowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKc7PVDtANU9JPOEsTwY=r=b4b+OEZsXL1CZ=qFB7N-rP9WdXA@mail.gmail.com' \
    --to=sgniazdowski@gmail.com \
    --cc=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).