unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: David De La Harpe Golden <david@harpegolden.net>
Cc: Eli Zaretskii <eliz@gnu.org>,
	Lennart Borgman <lennart.borgman@gmail.com>,
	monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Emacs 23.0 is much slower starting than Emacs 22.3
Date: Fri, 24 Oct 2008 11:21:04 +0000	[thread overview]
Message-ID: <20081024112104.GA3246@muc.de> (raw)
In-Reply-To: <4901287F.3000203@harpegolden.net>

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:
> "SPEED _MATTERS_ IN THIS FUNCTION!!!"

> 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).




  parent reply	other threads:[~2008-10-24 11:21 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-22  9:11 Emacs 23.0 is much slower starting than Emacs 22.3 Alan Mackenzie
2008-10-22 13:23 ` Stefan Monnier
2008-10-22 13:55   ` John covici
2008-10-22 15:14   ` Alan Mackenzie
2008-10-22 16:46     ` David De La Harpe Golden
2008-10-22 21:12       ` Alan Mackenzie
2008-10-22 21:19         ` Eli Zaretskii
2008-10-23  9:21           ` Alan Mackenzie
2008-10-23 21:53             ` Eli Zaretskii
2008-10-23  6:53         ` David De La Harpe Golden
2008-10-23  9:09           ` Alan Mackenzie
2008-10-23 16:57             ` David De La Harpe Golden
2008-10-23 21:52               ` Eli Zaretskii
2008-10-23 22:33                 ` Lennart Borgman
2008-10-24  9:26                   ` Eli Zaretskii
2008-10-23 22:47                 ` David De La Harpe Golden
2008-10-23 23:12                   ` Lennart Borgman
2008-10-23 23:54                     ` Lennart Borgman
2008-10-24  9:51                       ` Eli Zaretskii
2008-10-24 13:58                         ` David De La Harpe Golden
2008-10-24 15:44                         ` Lennart Borgman
2008-10-24 16:24                           ` Chong Yidong
2008-10-24 16:48                             ` Eli Zaretskii
2008-10-24 16:45                           ` David De La Harpe Golden
2008-10-24 16:53                             ` Eli Zaretskii
2008-10-25  2:01                             ` Richard M. Stallman
2008-10-25  3:38                               ` David De La Harpe Golden
2008-10-24  0:13                     ` David De La Harpe Golden
2008-10-24  0:59                       ` Lennart Borgman
2008-10-24  1:58                         ` David De La Harpe Golden
2008-10-24  1:44                       ` David De La Harpe Golden
2008-10-24  9:57                         ` Eli Zaretskii
2008-10-24 15:00                           ` David De La Harpe Golden
2008-10-24 11:21                         ` Alan Mackenzie [this message]
2008-10-24 14:32                           ` David De La Harpe Golden
2008-10-24 19:28                             ` Alan Mackenzie
2008-10-24 19:35                               ` David De La Harpe Golden
2008-10-24  4:13                       ` Stefan Monnier
2008-10-24 15:19                         ` David De La Harpe Golden
2008-10-24 18:42                           ` Stefan Monnier
2008-10-24 19:36                             ` David De La Harpe Golden
2008-10-24 23:44                             ` David De La Harpe Golden
2008-10-25 15:19                               ` Stefan Monnier
2008-10-25 17:02                                 ` David De La Harpe Golden
2008-10-24  9:52                       ` Eli Zaretskii
2008-10-24  9:35                     ` Eli Zaretskii
2008-10-24  9:30                   ` Eli Zaretskii
2008-10-23  1:29       ` Miles Bader
2008-10-23  9:06         ` Alan Mackenzie
2008-10-22 18:26 ` Eli Zaretskii
2008-10-22 21:40   ` Alan Mackenzie
2008-10-22 22:09     ` Eli Zaretskii
2008-10-22 21:02 ` Richard M. Stallman
2008-10-24 11:59   ` Emacs 23.0 is much slower than Emacs 22.3. Maybe it's the garbage collector Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081024112104.GA3246@muc.de \
    --to=acm@muc.de \
    --cc=david@harpegolden.net \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).