GNU bug report logs -
#15294
24.3.50; js2-mode parser is several times slower in lexical-binding mode
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Fri, 6 Sep 2013 21:01:02 UTC
Severity: normal
Found in version 24.3.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sun, 14 Dec 2014 09:08:23 -0500
with message-id <jwv61denx6p.fsf-monnier+emacsbugs <at> gnu.org>
and subject line Re: bug#15294: 24.3.50; js2-mode parser is several times slower in lexical-binding mode
has caused the debbugs.gnu.org bug report #15294,
regarding 24.3.50; js2-mode parser is several times slower in lexical-binding mode
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
15294: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15294
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
If I append -*- lexical-binding: t -*- to the first line of js2-mode.el
and eval the buffer, parsing a file takes several (3 to 4) times longer.
To measure:
0. Install js2-mode, e.g. from GNU ELPA.
1. Save
http://mootools.net/download/get/mootools-core-1.4.5-full-nocompat.js to
some local directory, open it in Emacs.
2. If it opens in some other mode than js2-mode, M-x js2-mode.
3. Don't touch the keys, wait until the file is parsed (the parsing gets
interrupted and rescheduled on input). When redisplay works again, we
can re-parse the file again and measure the time it takes.
4. eval-expression (js2-time (js2-reparse t)), wait until the message
area displays the amount of seconds the process took.
To measure the performance in interpreted mode, open js2-mode.el, M-x
eval-buffer and go through the above scenario (1-4).
To measure the performance in compiled mode, M-x byte-compile-file, then
(load "js2-mode.elc"), then go through the scenario.
My measurements:
lexical-binding | no | yes |
Interpreted | 1 sec | 4.26 sec |
Compiled | 0.63 sec | 1.76 sec |
--
In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.4)
of 2013-09-06 on axl
Bzr revision: 114159 dmantipov <at> yandex.ru-20130906164012-6j0s6otwkypj9s1z
Windowing system distributor `The X.Org Foundation', version 11.0.11303000
System Description: Ubuntu 13.04
[Message part 3 (message/rfc822, inline)]
>>> Not sure if I should close this issue now or at least wait until
>>> byte-compile--use-old-handlers is nil by default.
>> won't run on older Emacsen. I think I'd like to see 24.4 release before
>> making the change. But please do set it in your .emacs ASAP so it gets
>> wider testing.
> Just a reminder: I've been running with that setting for a while now,
So have I.
> with no problems that I can remember.
Well, I fixed a bug in it a while ago (some issue with "volatile", fixed
before the 24.4 release), but other than that, indeed it works fine.
The default value has been changed in "master" a couple months ago, already.
Stefan
This bug report was last modified 10 years and 240 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.