GNU bug report logs - #14886
Slowdown on font-lock-fontify-buffer

Previous Next

Package: emacs;

Reported by: Juanma Barranquero <lekktu <at> gmail.com>

Date: Tue, 16 Jul 2013 23:05:02 UTC

Severity: normal

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #58 received at 14886 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: Alan Mackenzie <acm <at> muc.de>, Paul Eggert <eggert <at> cs.ucla.edu>,
 14886 <at> debbugs.gnu.org
Subject: Re: bug#14886: Fwd: bug#14886: Fwd: A significant slowdown calling
 font-lock-fontify-buffer from a hook
Date: Wed, 24 Jul 2013 21:24:37 -0400
> - Font-lock-fontify-buffer should not be called from a hook.

Font-lock-fontify-buffer is definitely a bad function, since it has
2 different meanings (either "make sure the buffer is fontified" or
"please refontify the buffer").  It should be replaced by two different
functions:
- font-lock-ensure-fontification, which makes sure fontification is
  applied to a particular region (e.g. for use by things like
  htmlfontify or ps-print).
- font-lock-flush-fontification which indicates that the fontification
  for a particular region should be considered out-of-date (e.g. for use
  after calling font-lock-add/remove-keywords).
I don't see why any of those 3 functions shouldn't be called from
a hook, tho.
  
> - Errors during fontification should be visible.  That would have made
> clear that there was something wrong with the 24.3 use case.

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


        Stefan




This bug report was last modified 5 years and 210 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.