Subject: Re: Fwd: bug#14886: Fwd: A significant slowdown calling font-lock-fontify-buffer from a hook

From: Alan Mackenzie <[email-masked]>
Date: Wed, 24 Jul 2013 19:30:39 +0000

Hi, Juanma.

On Tue, Jul 23, 2013 at 01:16:21PM +0200, Juanma Barranquero wrote:
> Alan, I tried to Cc: you from this bug's thread, but apparently
> failed. Could you take a look at this bug, specially at the use case
> that triggered the bug report,

>   emacs -Q --eval "(add-hook 'prog-mode-hook
> #'font-lock-fontify-buffer)" src/xdisp.c -f kill-emacs

When I try this on today's trunk (just updated to rev #113531), I get
28.2s.  The same on Emacs 24.3 aborts with some sort of error in ~1.5s
(although there is no error message visible). 

When I run font-lock-fontify-buffer in either 24.3 or rev #113531 (after
appropriate setting up with global-font-lock-mode, etc.), it takes about
the same 28 seconds.  This is just how long it takes to fontify xdisp.c
without jit-lock.

I don't see the factor 4 slowdown that you did.

> ?

> TIA,

>   Juanma

> ---------- Forwarded message ----------
> From: Juanma Barranquero <[email-masked]>
> Date: Tue, Jul 23, 2013 at 12:11 AM
> Subject: Re: bug#14886: Fwd: A significant slowdown calling
> font-lock-fontify-buffer from a hook
> To: Stefan Monnier <[email-masked]>
> Cc: Paul Eggert <[email-masked]>, [email-masked]

> X-Debbugs-CC: [email-masked]

> > A run of profiler-start seems to indicate most of the time is spent in
> > c-find-decl-spots.

This is not unexpected.

> Alan, could you please take a look at this bug report? The problem
> seems specific to editing C files.

> Thanks,

>    Juanma

-- 
Alan Mackenzie (Nuremberg, Germany).