From: Eli Zaretskii <eliz@gnu.org>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: A significant slowdown calling font-lock-fontify-buffer from a hook
Date: Tue, 16 Jul 2013 21:47:11 +0300 [thread overview]
Message-ID: <83ehay2vgw.fsf@gnu.org> (raw)
In-Reply-To: <CAAeL0SQXebErPFigy5q03fPprJN+g6C=itt4as8vJ7JGMMDL7Q@mail.gmail.com>
> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Tue, 16 Jul 2013 20:26:56 +0200
> Cc: Emacs developers <emacs-devel@gnu.org>
>
> > Is the "calling from a hook" an important part of this issue?
>
> Doing
>
> emacs -Q src/xdisp.c
> M-x font-lock-fontify-buffer <RET>
>
> I don't see the slowdown.
First, you need to turn off global-font-lock-mode before visiting
xdisp.c. Second, if you do turn off global-font-lock-mode, invoking
font-lock-fontify-buffer will fail in Emacs 24.3. You need to do
something like this instead:
M-: (let ((c-standard-font-lock-fontify-region-function 'font-lock-default-fontify-region)) (font-lock-fontify-buffer)) RET
If I do this in Emacs 24.3 and in the current trunk, I do see a
significant slowdown: it takes 18 sec with 24.3, and 72 sec with the
current trunk.
So I think the invocation from hook is not a factor here, which is a
Good Thing, because debugging this will be much simpler ;-)
prev parent reply other threads:[~2013-07-16 18:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-16 0:12 A significant slowdown calling font-lock-fontify-buffer from a hook Juanma Barranquero
2013-07-16 18:01 ` Eli Zaretskii
2013-07-16 18:26 ` Juanma Barranquero
2013-07-16 18:47 ` Eli Zaretskii [this message]
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=83ehay2vgw.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=lekktu@gmail.com \
/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).