GNU bug report logs -
#14886
Slowdown on font-lock-fontify-buffer
Previous Next
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 #64 received at 14886 <at> debbugs.gnu.org (full text, mbox):
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 <at> 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).
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.