Re: 22.2 slower than 21.3
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: 22.2 slower than 21.3         

Group: gnu.emacs.help · Group Profile
Author: Alan Mackenzie
Date: Aug 29, 2008 07:27

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).
no comments
diggit! del.icio.us! reddit!

RELATED THREADS
SubjectArticles qty Group
Copying via ActiveSync gets slower and slowermicrosoft.public.pocketpc.developer ·