unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David Hansen <david.hansen@gmx.net>
Subject: Re: indent-region for long Java strings very slow
Date: Thu, 26 Oct 2006 17:06:33 +0200	[thread overview]
Message-ID: <87y7r3ce12.fsf@localhorst.mine.nu> (raw)
In-Reply-To: 1161872117.135227.178220@i42g2000cwa.googlegroups.com

On 26 Oct 2006 07:15:17 -0700 "giethomas@gmail.com" <giethomas@gmail.com> wrote:

> 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.

Not emacs related:  AFAIK javac creates a new StringBuffer
object for *each* `+'.  So if you don't want your program to
be unnecessarily slow do something like

String foo = (new StringBuffer ()).append (...)
  .append (...)
  .append (...)
  // ...
  .toString ();

David

  reply	other threads:[~2006-10-26 15:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-26 14:15 indent-region for long Java strings very slow giethomas
2006-10-26 15:06 ` David Hansen [this message]
     [not found] ` <mailman.268.1161875351.27805.help-gnu-emacs@gnu.org>
2006-10-26 17:43   ` Chris McMahan
2006-10-26 19:21     ` David Hansen
2006-10-27  6:56     ` giethomas
2006-10-26 23:12 ` Ilya Zakharevich
2006-11-18 20:31   ` David Combs
2006-11-19  7:55     ` Ilya Zakharevich

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87y7r3ce12.fsf@localhorst.mine.nu \
    --to=david.hansen@gmx.net \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).