help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: 22.2 slower than 21.3


From: Alan Mackenzie
Subject: Re: 22.2 slower than 21.3
Date: Fri, 29 Aug 2008 14:27:25 +0000
User-agent: Mutt/1.5.9i

Hi, Robert!

On Fri, Aug 29, 2008 at 01:06:52AM -0700, Robert wrote:
> Hi,

> I just installed 22.2 (pre-built binary for Windows XP), but find it
> slower than 21.3. I notice when opening C-files. I went straight back
> to 21.3 now because of that.

There was a bug in older CC Modes which made it "necessary" to scan
entire buffers when loading them.  It was this:

#########################################################################
put the following into
a C file, somewhere near the beginning:

#warning for isn't a keyword here.

This will foul up the font locking in the rest of the file.  Even more
dramatically, insert this:

#warning for isn't a keyword here. (
//#warning for isnt a keyword here.
void foo (bar)
{
#error Brace yourself! }
    printf ("Hello, world!\n") ; /* the famous one liner! */
}

Now the paren matching functions are fouled up.
#########################################################################

However, the fix for this this shouldn't make Emacs that much slower to
load.  On my 1.2 GHz Athlon, it added around 1 second per Mbyte of C
buffer.

> I have not been following this group regularly, is this a well known
> issue?

No.  At least, not yet.  :-)

> Will this get faster in upcoming versions? The problem could perhaps
> also be that the binary for Windows was built differently.  Have
> others seen the same as me?

Could you give me some figures, please?  _HOW_ much slower is the new CC
mode?  Could you please do:
(i) C-x C-f for a large C file please, one stored on your local hard
  drive.  Then kill the buffer with C-x k, thus ensuring the file is in
  the file system cache, if any.
(ii) Do C-x C-f for this file again, and say how long it takes.
(iii) Do C-x C-f for the same file in Emacs 21.x.  How long does this
  take?
(iv) State how large the file is, and what make and speed of CPU you
  have.

Thanks!

If there is a real problem here, like files taking 1 minute to load,
it'll get fixed.  If it's a case of the loading feeling a bit sluggish
(an extra 1 or 2 seconds to load), it may be possible to optimise things
a bit.

Look forward to hearing from you!

[P.S. It would be helpful if you could put "C Mode" or "a C file" or
something like that in the subject line for things like this.  That way,
I'm less likely to miss it.]

> -Robert

-- 
Alan Mackenzie (Nuremberg, Germany).




reply via email to

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