all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: Paul Eggert <eggert@cs.ucla.edu>, 14886@debbugs.gnu.org
Subject: bug#14886: Fwd: bug#14886: Fwd: A significant slowdown calling font-lock-fontify-buffer from a hook
Date: Fri, 26 Jul 2013 19:44:28 +0000	[thread overview]
Message-ID: <20130726194428.GA3974@acm.acm> (raw)
In-Reply-To: <CAAeL0SRqVotOMMFmxtvJ7oaZy4yoLPhm2aMZmmx-Z9MpGmzZ8w@mail.gmail.com>

Hi, Juanma.

On Thu, Jul 25, 2013 at 08:53:44AM +0200, Juanma Barranquero wrote:
> On Thu, Jul 25, 2013 at 3:24 AM, Stefan Monnier
> <monnier@iro.umontreal.ca> wrote:

> > I don't see why any of those 3 functions shouldn't be called from
> > a hook, tho.

> Well, it's not that you *must* not call it from a hook, is that if you
> call it when starting Emacs, you can have an unacceptable delay. No
> one on his/her sane mind wants to wait a long time (almost one minute
> in my current setup) to open a file that could be opened in less than
> 1s.

Running

emacs -Q --eval "(progn (add-hook 'prog-mode-hook #'font-lock-fontify-buffer) (setq debug-on-error t))" src/xdisp.c

on Emacs 24.3 (I've added a setting of `debug-on-error', and removed the
final `kill-emacs'), goes quickly.  This suggests that the buffer isn't
fully fontified - instead, merely that the first window of it gets
fontified by jit-lock.

> > Silent errors are bugs.  Please try and find what happens with
> > the error message.

The debug-on-error isn't triggered.  My guess that an error occurred
seems to be wrong.

In the trunk, the entire buffer seems to get fontified, taking ~28s on my
machine.  I think the definition of `font-lock-fontify-buffer' has
changed.  Could this change explain the difference in timings you see?

> I think that's more like Alan's ballpark.

I'm not sure I'm getting very far, here.  IIUC, the problem is that the
initial f-l-fontify-buffer is taking around 72s in some circumstances, as
opposed to 18s (on JB's machine).  I can't reproduce the problem.

>    J

-- 
Alan Mackenzie (Nuremberg, Germany).






  reply	other threads:[~2013-07-26 19:44 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
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 [this message]
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=20130726194428.GA3974@acm.acm \
    --to=acm@muc.de \
    --cc=14886@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --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.