all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: 25679@debbugs.gnu.org
Subject: bug#25679: 26.0.50; Emacs hangs for nested generics
Date: Mon, 13 Feb 2017 09:30:14 +0000	[thread overview]
Message-ID: <CAArVCkQ63qu0SOCyhFqf57HYJvcp6JUjXDyhoT7+3k0HWWSWBQ@mail.gmail.com> (raw)
In-Reply-To: <wvr4bmu9j17k.fsf@a.muc.corp.google.com>

[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]

Philipp Stephani <p.stephani2@gmail.com> schrieb am Fr., 10. Feb. 2017 um
20:28 Uhr:

>
> Create a file /tmp/Foo.java with the following content:
>
> class Foo {
>     void func(A<B<C>>> a, A<B<C>>> b, A<B<C>>> c, A<B<C>>> d, A<B<C>>> e,
> A<B<C>>> f, A<B<C>>> g, A<B<C>>> h, A<B<C>>> i, A<B<C>>> j, A<B<C>>> k) {}
> }
>
> Then open that file:
>
> emacs -Q /tmp/Foo.java
>
> Emacs hangs.  C-g also doesn't work.  GDB shows the culprit is a
> recursive invocation of
>
> "c-forward-<>-arglist-recur" (0x29dd1f00)
> "c-forward-<>-arglist" (0x29dd2530)
> "c-forward-name" (0x29dd2d40)
> "c-forward-type" (0x29dd3750)
>
> The actual top of the stack is often GC or a regex match.
> Seems the parsing of generic arguments has some exponential behavior.
> This is a regression since 24.3, where editing such files has no
> noticeable delay.
>
>
>
I've tried lowering font-lock-maximum-decoration, it also doesn't appear to
help. Even at level 1 Emacs hangs.

In general I've got quite a few reports about hangs and slowness in newer
versions of CC-Mode. Please make sure it never hangs, if necessary by
removing the more complex parsing algorithms and adding hard timeouts to
font locking.

[-- Attachment #2: Type: text/html, Size: 2246 bytes --]

  reply	other threads:[~2017-02-13  9:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-10 19:27 bug#25679: 26.0.50; Emacs hangs for nested generics Philipp Stephani
2017-02-13  9:30 ` Philipp Stephani [this message]
2021-02-05 13:20 ` Lars Ingebrigtsen

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=CAArVCkQ63qu0SOCyhFqf57HYJvcp6JUjXDyhoT7+3k0HWWSWBQ@mail.gmail.com \
    --to=p.stephani2@gmail.com \
    --cc=25679@debbugs.gnu.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.