all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
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:01:20 +0300	[thread overview]
Message-ID: <83ip0a2xlb.fsf@gnu.org> (raw)
In-Reply-To: <CAAeL0SSqSShXtsnqfkiF3H9n+OxYwuJ4yi6ci=wwfdnb8JpqcQ@mail.gmail.com>

> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Tue, 16 Jul 2013 02:12:40 +0200
> 
> I discovered this because I call colum-marker-1 (from
> colum-marker-mode, http://www.emacswiki.org/emacs/column-marker.el) in
> the prog-mode-hook, but the issue is with font-lock-fontify-buffer.
> 
> emacs -Q --eval "(add-hook 'prog-mode-hook
> #'font-lock-fontify-buffer)" src/xdisp.c -f kill-emacs
> 
> On Emacs 24.3, -O0 -g3 --enable-checking: about 2 seconds.
> On trunk, -O2 -g3 --enable-checking: ~ 33 seconds, x16 slowdown.
> 
> Any idea what could be causing this?

Is the "calling from a hook" an important part of this issue?  If so,
why?

I tried this:

  emacs -Q
  M-x global-font-lock-mode RET
  C-x C-f src/xdisp.c RET
  M-: (font-lock-fontify-buffer) RET

Is this a valid way of reproducing the slowdown?  If so, modify the
last command to start the profiler before invoking
font-lock-fontify-buffer and stop it after it returns, and you will
see that the current trunk calls a certain bunch of functions at least
five-fold more times than Emacs 24.3.  Could that be the reason?



  reply	other threads:[~2013-07-16 18:01 UTC|newest]

Thread overview: 31+ 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 [this message]
2013-07-16 18:26   ` Juanma Barranquero
2013-07-16 18:47     ` Eli Zaretskii
2013-07-16 23:03       ` bug#14886: Fwd: " Juanma Barranquero
2013-07-17  3:05         ` Juanma Barranquero
2013-07-17  4:02           ` Eli Zaretskii
2013-07-17  9:04             ` Juanma Barranquero
2013-07-17 11:42               ` Juanma Barranquero
2013-07-17 12:50                 ` Paul Eggert
2013-07-17 13:43                   ` Juanma Barranquero
2013-07-17 13:59                     ` Paul Eggert
2013-07-17 15:19                     ` Juanma Barranquero
2013-07-17 15:57                     ` Glenn Morris
2013-07-17 16:56                       ` Juanma Barranquero
2013-07-22  4:20                   ` Stefan Monnier
2013-07-22 22:11                     ` Juanma Barranquero
     [not found]                       ` <CAAeL0STtrBnWTbc0FSPn6XHArcDtxHwzNVaijvyG5bVKMLRo+w@mail.gmail.com>
2013-07-24 19:30                         ` bug#14886: Fwd: " Alan Mackenzie
2013-07-24 21:29                           ` Juanma Barranquero
2013-07-25  1:24                             ` Stefan Monnier
2013-07-25  6:53                               ` Juanma Barranquero
2013-07-26 19:44                                 ` Alan Mackenzie
2013-07-26 21:32                                   ` Juanma Barranquero
2013-07-27  9:35                                     ` Alan Mackenzie
2013-07-27 10:10                                       ` Juanma Barranquero
2013-07-27 10:20                                       ` martin rudalics
2013-07-27 14:03                                         ` Stefan Monnier
2013-07-28  9:58                                         ` Alan Mackenzie
2019-10-30 12:52                                           ` Lars Ingebrigtsen
2013-07-17 15:04               ` Eli Zaretskii
2013-07-17 15:16                 ` Juanma Barranquero

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

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

  git send-email \
    --in-reply-to=83ip0a2xlb.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.