[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56682: Fix the long lines font locking related slowdowns
From: |
Stefan Monnier |
Subject: |
bug#56682: Fix the long lines font locking related slowdowns |
Date: |
Sun, 31 Jul 2022 03:25:46 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> IIUC, what Stefan suggests is the following, which seems (almost) fine to
> me. The only problem I see is that jit-lock-function is not the only user
> of fontication-functions. It has at least two other users: in ELPA
> multi-mode.el sets fontification-functions to multi-fontify, and in MELPA
> poly-lock.el sets fontification-functions to poly-lock-function.
Good point.
> @@ -4412,9 +4412,9 @@ handle_fontified_prop (struct it *it)
> ptrdiff_t begv = it->narrowed_begv ? it->narrowed_begv : BEGV;
> ptrdiff_t zv = it->narrowed_zv;
> ptrdiff_t charpos = IT_CHARPOS (*it);
> if (begv <= charpos && charpos <= zv)
> - Fnarrow_to_region (make_fixnum (begv), make_fixnum (zv), Qt);
> + specbind (Qfontification_functions_restriction,
> + Fcons (make_fixnum (begv), make_fixnum (zv)));
> }
Hpw 'bout we do the reverse then: set the narrowing, but let-bind
a variable to indicate that we're inside a line-length-induced
narrowing, together with the previous narrowing bounds, so jit-lock or
its clients can undo the narrowing when needed?
Stefan
- bug#56682: Fix the long lines font locking related slowdowns, (continued)
- bug#56682: Fix the long lines font locking related slowdowns, Stefan Monnier, 2022/07/26
- bug#56682: Fix the long lines font locking related slowdowns, Gregory Heytings, 2022/07/27
- bug#56682: Fix the long lines font locking related slowdowns, Stefan Monnier, 2022/07/30
- bug#56682: Fix the long lines font locking related slowdowns, Eli Zaretskii, 2022/07/30
- bug#56682: Fix the long lines font locking related slowdowns, Gregory Heytings, 2022/07/30
- bug#56682: Fix the long lines font locking related slowdowns, Eli Zaretskii, 2022/07/30
- bug#56682: Fix the long lines font locking related slowdowns, Gregory Heytings, 2022/07/30
- bug#56682: Fix the long lines font locking related slowdowns, Eli Zaretskii, 2022/07/30
- bug#56682: Fix the long lines font locking related slowdowns, Gregory Heytings, 2022/07/30
- bug#56682: Fix the long lines font locking related slowdowns, Gregory Heytings, 2022/07/30
- bug#56682: Fix the long lines font locking related slowdowns,
Stefan Monnier <=
- bug#56682: Fix the long lines font locking related slowdowns, Eli Zaretskii, 2022/07/31
- bug#56682: Fix the long lines font locking related slowdowns, Gregory Heytings, 2022/07/31
- bug#56682: Fix the long lines font locking related slowdowns, Stefan Monnier, 2022/07/31
- bug#56682: Fix the long lines font locking related slowdowns, Gregory Heytings, 2022/07/31
- bug#56682: Fix the long lines font locking related slowdowns, Stefan Monnier, 2022/07/31
- bug#56682: Fix the long lines font locking related slowdowns, Gregory Heytings, 2022/07/31
- bug#56682: Fix the long lines font locking related slowdowns, Stefan Monnier, 2022/07/31
- bug#56682: Fix the long lines font locking related slowdowns, Gregory Heytings, 2022/07/31
- bug#56682: Fix the long lines font locking related slowdowns, Dmitry Gutov, 2022/07/31
- bug#56682: Fix the long lines font locking related slowdowns, Gregory Heytings, 2022/07/31