emacs-devel
[Top][All Lists]
Advanced

[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: David De La Harpe Golden
Subject: Re: Emacs 23.0 is much slower starting than Emacs 22.3
Date: Fri, 24 Oct 2008 16:00:57 +0100
User-agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018)

Eli Zaretskii wrote:
Date: Fri, 24 Oct 2008 02:44:31 +0100
From: David De La Harpe Golden <address@hidden>
CC: address@hidden, Eli Zaretskii <address@hidden>, address@hidden, address@hidden

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

How does this compare with Emacs 22?

(gc-cons-threshold @ 1G as it was for the emacs23 test your replied to)

As you can see by comparing the two, the "set-auto-mode" path of "normal-mode" is similar overhead on both but "hack-local-variables" is about 27 TIMES slower on emacs23...

Function Name                 Call Count  Elapsed Time  Average Time
============================  ==========  ============  ============
find-file-noselect            180         2.2096209999  0.0122756722
find-file-noselect-1          180         1.4848800000  0.0082493333
after-find-file               180         1.226164      0.0068120222
normal-mode                   180         0.9997670000  0.0055542611
set-auto-mode                 180         0.9343669999  0.0051909277
set-auto-mode-0               180         0.9077470000  0.0050430388
c-mode                        180         0.9068940000  0.0050383000
c-common-init                 180         0.6864290000  0.0038134944
c-neutralize-syntax-in-CPP    182         0.5930520000  0.0032585274
run-hooks                     1998        0.2834299999  0.0001418568
c-init-language-vars-for      180         0.1180209999  0.0006556722
c-basic-common-init           180         0.0789910000  0.0004388388
c-neutralize-CPP-line         14000       0.0531670000  3.797...e-06
hack-local-variables          181         0.0335519999  0.0001853701
easy-menu-add                 180         0.0288129999  0.0001600722
make-local-variable           11046       0.0169949999  1.538...e-06
set-auto-mode-1               363         0.0139350000  3.838...e-05
kill-all-local-variables      361         0.0090380000  2.503...e-05
c-setup-paragraph-variables   361         0.0067259999  1.863...e-05
c-update-modeline             360         0.0059999999  1.666...e-05
c-extend-region-for-CPP       182         0.0048190000  2.647...e-05
c-font-lock-init              180         0.0033029999  1.834...e-05
cc-imenu-init                 180         0.0009289999  5.161...e-06
c-initialize-cc-mode          180         0.0004939999  2.744...e-06
c-after-change                2           0.000241      0.0001205
use-local-map                 182         0.0001749999  9.615...e-07
set-syntax-table              182         0.0001529999  8.406...e-07
c-before-change               2           0.000103      5.15e-05
c-extend-after-change-region  2           3e-06         1.5e-06




reply via email to

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