From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hansen Newsgroups: gmane.emacs.help Subject: Re: indent-region for long Java strings very slow Date: Thu, 26 Oct 2006 17:06:33 +0200 Organization: disorganized Message-ID: <87y7r3ce12.fsf@localhorst.mine.nu> References: <1161872117.135227.178220@i42g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1161875403 5332 80.91.229.2 (26 Oct 2006 15:10:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Oct 2006 15:10:03 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 26 17:10:00 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gd6ra-0002Jn-Ks for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Oct 2006 17:09:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gd6ra-0003kd-52 for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Oct 2006 11:09:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gd6qz-0003Or-C6 for help-gnu-emacs@gnu.org; Thu, 26 Oct 2006 11:09:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gd6qy-0003OE-IX for help-gnu-emacs@gnu.org; Thu, 26 Oct 2006 11:09:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gd6qx-0003O7-GD for help-gnu-emacs@gnu.org; Thu, 26 Oct 2006 11:09:07 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Gd6qx-0001UN-6d for help-gnu-emacs@gnu.org; Thu, 26 Oct 2006 11:09:07 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Gd6qc-00027Z-Gf for help-gnu-emacs@gnu.org; Thu, 26 Oct 2006 17:08:46 +0200 Original-Received: from e178055026.adsl.alicedsl.de ([85.178.55.26]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Oct 2006 17:08:46 +0200 Original-Received: from david.hansen by e178055026.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Oct 2006 17:08:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-To: help-gnu-emacs@gnu.org Original-Lines: 17 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: e178055026.adsl.alicedsl.de Mail-Copies-To: nobody User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:8Uc85lFuceGJygu9Xmz9fzoMdBg= X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:38299 Archived-At: On 26 Oct 2006 07:15:17 -0700 "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