[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Re: cc-mode fontification feels random
From: |
Stefan Monnier |
Subject: |
Re: [PATCH] Re: cc-mode fontification feels random |
Date: |
Tue, 31 Aug 2021 14:56:13 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> So, it seems I want something like stealth, but not quite. How about,
> say jit-lock-single-fontification - it would apply to individual buffers
> only, would scan through the buffer precisely once, and would do just
> enough 500-byte chunks at at time to take 0.05 seconds (configurable).
I still don't think it's a good use of resources: fontifying the whole
buffer is usually completely unnecessary because most of that buffer
will never be displayed, and because we can fontifying them fast enough
that doing it ahead of time won't save us enough time when we do display
those parts.
[ Typical concrete problems show up when you visit a hundred files
(e.g. for a search&replace, or when loading your desktop.el) after which
your Emacs stays busy for a long time fontifying all those buffers. ]
For my own use, the benefit of "correct" highlighting of types is not
worth any effort at all. Maybe some users would enjoy the improved
highlighting of your new code, but if so I think you'd be better off
running an ad-hoc timer that does nothing else than scan for type
declarations (without doing the rest of font-lock). It'll be faster and
you won't need to care about what jit-lock does.
Stefan
- Re: [PATCH] Re: cc-mode fontification feels random, (continued)
- 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, 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, 2021/08/31
- Re: [PATCH] Re: cc-mode fontification feels random,
Stefan Monnier <=
- 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