[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Re: cc-mode fontification feels random
From: |
Eli Zaretskii |
Subject: |
Re: [PATCH] Re: cc-mode fontification feels random |
Date: |
Tue, 31 Aug 2021 19:21:40 +0300 |
> Date: Tue, 31 Aug 2021 16:02:45 +0000
> Cc: monnier@iro.umontreal.ca, dancol@dancol.org, emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
>
> > What happens if you unleash this jit-lock-single-fontification, and
> > then type at a relatively slow pace: does Emacs still feel responsive
> > enough? And how much of CPU does it use in that case?
>
> I'm guessing at the moment
Well, my point, if it wasn't clear, was to suggest that you or someone
else actually try that and see what happens and how does it feel.
Emacs is a complex beast, so the results might surprise us all.
> but I'm reckoning that if
> jit-lock-single-fontification uses (marginally over) 0.05s at a time,
> followed by (at least) 0.1s break, normal typing at up to ten characters
> per second shouldn't be affected.
Not sure where did the 0.05 sec number come from. You want to limit
the fontification of a chunk to that time, but we don't have an
efficient method of doing that, because Emacs is not an
interrupt-driven program. So if a Lisp program starts some heavy
processing, it will only be able to stop when it gets to looking at
how much time passed, or tests some flag set by a signal handler.
There can be no guarantee this can never exceed 50 msec.
> As for how much CPU, then I think it would use one third of a single
> core's CPU time on an otherwise idle Emacs. That's 0.05s strenuous
> activity followed by 0.1s break.
30% of an execution unit is not negligible. When I see something like
that on my system that I presume should be idle, I start looking for
an offender. And I'm not sure the 30% estimate is accurate. Once
again, let's measure it.
- [PATCH] Re: cc-mode fontification feels random, Alan Mackenzie, 2021/08/30
- Re: [PATCH] Re: cc-mode fontification feels random, Perry E. Metzger, 2021/08/30
- Re: [PATCH] Re: cc-mode fontification feels random, Eli Zaretskii, 2021/08/30
- Re: [PATCH] Re: cc-mode fontification feels random, Daniel Colascione, 2021/08/30
- Re: [PATCH] Re: cc-mode fontification feels random, Eli Zaretskii, 2021/08/30
- Re: [PATCH] Re: cc-mode fontification feels random, Stefan Monnier, 2021/08/30
- Re: [PATCH] Re: cc-mode fontification feels random, Alan Mackenzie, 2021/08/31
- Re: [PATCH] Re: cc-mode fontification feels random, Eli Zaretskii, 2021/08/31
- Re: [PATCH] Re: cc-mode fontification feels random, Alan Mackenzie, 2021/08/31
- Re: [PATCH] Re: cc-mode fontification feels random,
Eli Zaretskii <=
- Re: [PATCH] Re: cc-mode fontification feels random, Alan Mackenzie, 2021/08/31
- Re: [PATCH] Re: cc-mode fontification feels random, Eli Zaretskii, 2021/08/31
- Re: [PATCH] Re: cc-mode fontification feels random, Stefan Monnier, 2021/08/31
- Re: [PATCH] Re: cc-mode fontification feels random, Alan Mackenzie, 2021/08/31
- Re: [PATCH] Re: cc-mode fontification feels random, Stefan Monnier, 2021/08/31
- Re: [PATCH] Re: cc-mode fontification feels random, Eli Zaretskii, 2021/08/31
Re: [PATCH] Re: cc-mode fontification feels random, Alan Mackenzie, 2021/08/30