[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20352: Factor 2 slow down of font-locking in c-mode

From: Alan Mackenzie
Subject: bug#20352: Factor 2 slow down of font-locking in c-mode
Date: Sat, 18 Apr 2015 17:32:34 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello again, Stefan.

Apologies for some misinformation in my previous post.  My timings for
the master branch were on an Emacs configured with no compiler
optimisation.   When I reconfigure and rebuild with default optimisation
the figures look like....

On Sat, Apr 18, 2015 at 09:45:52AM +0000, Alan Mackenzie wrote:
> On Sat, Apr 18, 2015 at 12:35:19AM -0400, Stefan Monnier wrote:
> > > Twice as slow, eh?  You should be so lucky!  I've just tried it, and for
> > > me it's nearer a factor of 10.  ;-(

> > My original case (M-x swiper RET when in src/xdisp.c, while running my
> > locally hacked Emacs on my desktop with all debugging enabled) seemed to
> > be also way past a factor 2 (it just seemed like it would never end and
> > did not have the patience to wait for it to finish), so
> > I made a measurement on a dedicated machine where I recompiled the
> > unadulterated Emacs with default flags and all and got a "disappointing"
> > factor of 2, which still seemed significant enough.

> Some figures:  I tried running (with M-:)
> (let ((start (float-time)))
>   (font-lock-fontify-region (point-min) (point-max))
>   (- (float-time) start))
> on xdisp.c, freshly loaded before each attempt, with 2 versions of Emacs
> and 2 versions of CC Mode.  Here are the timings (in seconds):

> Released Emacs-24.5
>   Emacs-24.5's CC Mode:      29.82369565963745
>   savannah master's CC Mode: 55.37644958496094
> savannah Master
>   Emacs-24.5's CC Mode:      109.47807884216309
>   savannah Master's CC Mode: 241.9050052165985

savannah Master compiled with default optimisation
  Emacs-24.5's CC Mode:      28.840153694152832
  savannah Master's CC Mode: 55.49798059463501

So you were right - the master branch's CC Mode is fontifying at half
speed.  I'm doing some bisecting to try and find the commit which did

> .  So it seems that some changes in CC Mode and some other changes
> outside of CC Mode are both to blame, here.

No, it's a CC Mode thing only.

> >         Stefan

Alan Mackenzie (Nuremberg, Germany).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]