[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rmsbolt.el [Was: Colorful line numbers]
From: |
Stefan Monnier |
Subject: |
Re: rmsbolt.el [Was: Colorful line numbers] |
Date: |
Sat, 23 Jul 2022 12:31:52 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>> > The big difference from my POV is that text properties slow down
>> > redisplay code
>> If that's indeed a problem, then maybe we should provide "non-display
>> text-properties". I.e. text-properties which do not influence the
>> display, so we can store them in a parallel interval tree
> That's quite a complication. For starters, how to make sure the same
> property doesn't get stored in both trees? Next, redisplay aside,
> most if not all properties that are important for redisplay are also
> important to Lisp, and so Lisp programs will now have to look at two
> interval trees.
If we need/want to solve those problems, I don't see any
technical difficulty. Until we have found it necessary, the question is moot.
>> (tho we'd have to check whether the source of the slowdown is the
>> interval tree itself or the length of the `plist`s stored in its
>> nodes, so maybe we could have a single tree but with two `plist`
>> fields, one for display-related properties and the other for
>> non-display-related properties).
>
> The immediate source of slowdown is that the display iterator stops at
> every position where the properties change, and runs all of its
> "handle stop-point" handlers, each one of which examines the
> properties it handles (fontified, face, invisible, and display).
>
> For what we do with the tree and the properties we find, see
> compute_stop.
So adding a text property for the line numbers's face would (in
the worst case) add 2 "handle stop-points" per line (could be reduced
to one by making those properties cover the whole "line plus newline"
so there's only one stop-point between them).
Could that really cause a measurable slow down?
Stefan
- Re: Colorful line numbers, (continued)
- Re: Colorful line numbers, Eli Zaretskii, 2022/07/22
- Re: Colorful line numbers, João Távora, 2022/07/22
- Re: Colorful line numbers, Eli Zaretskii, 2022/07/22
- rmsbolt.el [Was: Colorful line numbers], João Távora, 2022/07/22
- Re: rmsbolt.el [Was: Colorful line numbers], Stefan Monnier, 2022/07/22
- Re: rmsbolt.el [Was: Colorful line numbers], Eli Zaretskii, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers], João Távora, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers], Eli Zaretskii, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers], Stefan Monnier, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers], Eli Zaretskii, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers],
Stefan Monnier <=
- Re: Colorful line numbers, Eli Zaretskii, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers], João Távora, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers], João Távora, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers], Jay Kamat, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers], Stefan Monnier, 2022/07/23
- Eglot to core [Was: rmsbolt.el [Was: Colorful line numbers]], João Távora, 2022/07/23
- Re: Eglot to core [Was: rmsbolt.el [Was: Colorful line numbers]], Stefan Monnier, 2022/07/23
- Re: Eglot to core [Was: rmsbolt.el [Was: Colorful line numbers]], João Távora, 2022/07/24
- Re: Eglot to core [Was: rmsbolt.el [Was: Colorful line numbers]], Stefan Monnier, 2022/07/24
- Re: Eglot to core [Was: rmsbolt.el [Was: Colorful line numbers]], Po Lu, 2022/07/24