[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: indent-region for long Java strings very slow
From: |
Ilya Zakharevich |
Subject: |
Re: indent-region for long Java strings very slow |
Date: |
Thu, 26 Oct 2006 23:12:47 +0000 (UTC) |
User-agent: |
trn [how to get a version via %-escapes???] with a custom header |
[A complimentary Cc of this posting was sent to
giethomas@gmail.com
<giethomas@gmail.com>], who wrote in article
<1161872117.135227.178220@i42g2000cwa.googlegroups.com>:
> When I build a very long Java String with lots of components (... + ...
> + ... +), spread out over many lines (each terminated by a newline),
> indent-region gets very, very slow.
>
> Anybody any idea why and how to avoid this?
I suspect that this indicates c-mode being too dumb to use linear-time
indent algorithm. 20 years ago it was acceptable to have
quadratic-time indent logic; one could not do better, since
parse-partial-sexp was not designed well enough. But I added
necessary hooks to parse-partial-sexp (more than?) 10 years ago.
Nowadays all the decent modes should have linear-time logic for
indent. It looks like c-mode is not decent enough...
Puzzled,
Ilya