From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dkcombs@panix.com (David Combs) Newsgroups: gmane.emacs.help Subject: Re: indent-region for long Java strings very slow Date: Sat, 18 Nov 2006 20:31:14 +0000 (UTC) Organization: Public Access Networks Corp. Message-ID: References: <1161872117.135227.178220@i42g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1163882425 18709 80.91.229.2 (18 Nov 2006 20:40:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 18 Nov 2006 20:40:25 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 18 21:40:21 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 1GlWz5-0005sw-Cj for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Nov 2006 21:40:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GlWz4-0006dh-UA for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Nov 2006 15:40:18 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-NNTP-Posting-Host: panix1.panix.com Original-X-Trace: reader2.panix.com 1163881874 20089 166.84.1.1 (18 Nov 2006 20:31:14 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Sat, 18 Nov 2006 20:31:14 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Original-Xref: shelby.stanford.edu gnu.emacs.help:143186 Original-To: help-gnu-emacs@gnu.org 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:38804 Archived-At: In article , Ilya Zakharevich wrote: >[A complimentary Cc of this posting was sent to >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 FOI: are you perhaps thinking of fixing it? Thanks David