[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs 23.0 is much slower starting than Emacs 22.3

From: Alan Mackenzie
Subject: Re: Emacs 23.0 is much slower starting than Emacs 22.3
Date: Fri, 24 Oct 2008 11:21:04 +0000
User-agent: Mutt/1.5.9i

Hi, David!

First of all, I'm writing this on Friday, ~10:45 UCT.  My ISP's mail
server is having problems, so I don't know when this will get through.
It's somewhat frustrating.  :-(

On Fri, Oct 24, 2008 at 02:44:31AM +0100, David De La Harpe Golden wrote:
> David De La Harpe Golden wrote:

> >+++ Which leaves set-auto-mode...

> Which seems to be mostly the particular mode - So of course, this can 
> presumably vary wildly from mode to mode, but let's take c-mode (seeing 
> as it's for the c files I was testing with):

> set-auto-mode->set-auto-mode-0->
> c-mode-> (c-init-language-vars-for,
> c-common-init->(c-basic-common-init,
> run some internal hooks, like the "neutralize"), ...)

> See existing c-neutralize-syntax-in-CPP initial comment:

> Profiling confirms - yes, it does. :-)

That function's one of mine.  :-)  The story behind the comment is that
my original version of that function was written without consideration
of its speed, and was about two orders of magnitude slower.  People were
complaining, with justification, that it was taking ~1 minute to load a
large file.c.

However, the current function isn't that slow.  I timed it for 100
iterations on a file 2,927,889 bytes big.  It's taking 0.72s for this
file, i.e. about 0.25s per megabyte, and that's on my 1.2 GHz Athlon.

So on emacs/src's 118 files.c, total size 8772802, that function would
take only 2.5s, again, on my Athlon.  On your machine it would be ~0.5s.

Besides, in my original measurements, I was executing the same CC Mode
in Emacs 22 and Emacs 23.

c-neutralize-syntax-in-CPP isn't the problem.

[ .... ]

Alan Mackenzie (Nuremberg, Germany).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]