emacs-devel
[Top][All Lists]
Advanced

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

Re: CC Mode with font-lock-maximum-decoration 2


From: Alan Mackenzie
Subject: Re: CC Mode with font-lock-maximum-decoration 2
Date: Mon, 8 Aug 2022 19:09:50 +0000

Hello, Eli.

On Mon, Aug 08, 2022 at 21:51:47 +0300, Eli Zaretskii wrote:
> > Date: Mon, 8 Aug 2022 18:41:01 +0000
> > Cc: emacs-devel@gnu.org
> > From: Alan Mackenzie <acm@muc.de>

> > > And btw, I'm not sure I understand what you are saying.  Are you
> > > saying that level 2 is enough for fontifications in C mode?

> > No.

> > > If so, what are we losing when compared to the value t, and if we don't
> > > lose anything important, why do we need any fontifications beyond what
> > > level 2 gives us?

> > We lose accuracy.  That is important to a lot of people, including the
> > many who have sent in bug reports because of lack of accuracy.

> Then what is the importance of these measurements of yours?

They show that an attempt to speed up CC Mode/2 should be concentrating
on the code which isn't fontification code.

> The fact that at level 2 C mode is only slightly slower than Lisp mode
> is therefore purely academic: you don't expect anyone to use it, and
> don't recommend using it.

The _FONTIFICATION_ of CC Mode/2 is only a little slower than that of
Emacs Lisp Mode.  Reports from you show that the mode as a whole is too
slow.  I do expect people to use it, those for whom lightning fast
response is more important than accuracy.  I just don't think these users
constitute a majority.

> > > For Lisp, btw, the difference between level 2 and t is negligible.
> > > And the same goes for most/all other modes, which is the reason why we
> > > have set the value to t years ago.  I'm quite sure at that time the
> > > difference between 2 and t for C mode was also very small.

> > Martin Stjernholm wrote (what has become) the current level 3 around 20
> > years ago, noting specifically it was expected to be slower than before,
> > and that the new level 2 was comparable in both speed and accuracy to the
> > old level 3.  Since then level 3 has become considerably more accurate
> > and quite a bit slower, too.

> That's almost certainly what happened.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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