From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: Unbearably slow editing in .h files Date: Wed, 02 Apr 2008 16:47:52 -0700 Message-ID: <200804022347.m32NlqS5010556@sallyv1.ics.uci.edu> References: <8763xl492o.fsf@jurta.org> <200801230225.m0N2Ptmx012952@sallyv1.ics.uci.edu> <200801271954.m0RJsmBm003714@sallyv1.ics.uci.edu> <479DAC55.8070302@gmx.at> <200801300258.m0U2w9rr005169@sallyv1.ics.uci.edu> <47B9E0B1.1090908@gmx.at> <20080223224901.GB3476@muc.de> <47C0A376.8080105@gmx.at> <20080402220710.GC1283@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1207180170 23629 80.91.229.12 (2 Apr 2008 23:49:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Apr 2008 23:49:30 +0000 (UTC) Cc: martin rudalics , Stefan Monnier , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 03 01:50:01 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JhCiP-0005Wg-2m for ged-emacs-devel@m.gmane.org; Thu, 03 Apr 2008 01:50:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JhChm-0008L3-Pn for ged-emacs-devel@m.gmane.org; Wed, 02 Apr 2008 19:49:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JhChj-0008Kk-0N for emacs-devel@gnu.org; Wed, 02 Apr 2008 19:49:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JhChh-0008K6-EY for emacs-devel@gnu.org; Wed, 02 Apr 2008 19:49:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JhChh-0008K3-6H for emacs-devel@gnu.org; Wed, 02 Apr 2008 19:49:17 -0400 Original-Received: from sallyv1.ics.uci.edu ([128.195.1.109]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1JhChg-0007J5-M7 for emacs-devel@gnu.org; Wed, 02 Apr 2008 19:49:16 -0400 X-ICS-MailScanner-Watermark: 1207784874.74938@lxeCEUnSA4bjiO0xmO5zhw Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv1.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m32NlqS5010556; Wed, 2 Apr 2008 16:47:52 -0700 (PDT) In-Reply-To: <20080402220710.GC1283@muc.de> (Alan Mackenzie's message of "Wed, 2 Apr 2008 22:07:10 +0000") Original-Lines: 36 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:94237 Archived-At: Alan Mackenzie writes: > Hi, Martin and Stefan, > > On Sat, Feb 23, 2008 at 11:51:34PM +0100, martin rudalics wrote: > > Evening Alan, > > > > What is add-log-current-defun using c-beginning-of-defun for? > > > Visit lisp.h, go to the end of the buffer, and do > > > M-x RET c-beginning-of-defun RET > > > Convincing? > > I have just fixed this problem (I hope!) in both the Emacs-22 branch and > the trunk. Basically, the contorted functionality in add-log.el has > been superseded by optimised routines in cc-cmds.el. > > On my 1.2 GHz Athlon machine, C-x 4 a now takes around 4 seconds at the > end of lisp.h, in the trunk. It's somewhat faster in the Emacs-22 > branch, but I don't know why. > > I think this is fast enough. Can it be faster? Might sound like a joke, but it's a serious question. `diff-add-change-log-entries-other-window' uses this (calls it once per diff hunk), and it is nice to let it run on largish diff buffers to quickly produce a skeleton for a ChangeLog . Is the slowdown still caused by the fact that is hard to distinguish a K&R functions from variable declarations? Thanks --dan