[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: jit-lock refontifies too much
From: |
Richard M. Stallman |
Subject: |
Re: jit-lock refontifies too much |
Date: |
Mon, 26 Sep 2005 19:56:36 -0400 |
False positives: When, for example, text within a string was never
fontified before it (usually) does not have a font-lock face property.
After first fontification it does. Hence my comparison above would
indicate a change although there never was a buffer modification.
It would be better just to keep comparing until you reach a line that
previously was fontified. After all, the line that was not fontified
before certainly should get fontified, if it is on the screen. But a
subsequent line that was previously fontified may not need to be
changed.
> jit-lock-context-time is not normally zero. So what exactly is the
> goal of your proposal? Is the goal to make jit-lock-context-time zero
> without loss of performance?
My goal is to save CPU overhead due to contextual refontification. But
Stefan asked me to provide an example where contextual refontification
could have visible impact.
Since the question is whether there is a realistic case where it would
have visible impact. If nobody really wants to set
jit-lock-context-time to zero, that's not a realistic example.
So we still don't know whether there is a realistic case where it
would have visible impact.
With ppss things are
different since any "old value" gets lost together with the buffer
modification. Hence, I can't use ppss to establish the old value when
refontifying.
Yes. That is why I suggested recording these ppss values in text
properties of the first character on a line--so that they would stay
around for comparison later.
That would be overly expensive. I rewrote all this with ppss, two
markers, a before-change-functions hook and without any text properties.
It seems to work but needs some further testing.
That is interesting. I would not have expected it to work.
However, this would require doing that computation for each change,
and that could be rather expensive, right?
One advantage for the idea of saving it in a text property for the
first character on each line is that it only has to be checked
when it is time to refontify.
Another possible advantage is: if things are not in sync for the first
line after the end of the changed text, it might be in sync on a
subsequent line, and that could avoid refontifying most of the lines
on the screen.
- Re: jit-lock refontifies too much, (continued)
- Re: jit-lock refontifies too much, martin rudalics, 2005/09/14
- Re: jit-lock refontifies too much, Stefan Monnier, 2005/09/14
- Re: jit-lock refontifies too much, martin rudalics, 2005/09/15
- Re: jit-lock refontifies too much, Richard M. Stallman, 2005/09/19
- Re: jit-lock refontifies too much, Stefan Monnier, 2005/09/20
- Re: jit-lock refontifies too much, martin rudalics, 2005/09/21
- Re: jit-lock refontifies too much, Stefan Monnier, 2005/09/21
- Re: jit-lock refontifies too much, martin rudalics, 2005/09/22
- Re: jit-lock refontifies too much, Stefan Monnier, 2005/09/22
- Re: jit-lock refontifies too much, martin rudalics, 2005/09/25
- Re: jit-lock refontifies too much,
Richard M. Stallman <=
- Re: jit-lock refontifies too much, martin rudalics, 2005/09/27
- Re: jit-lock refontifies too much, Richard M. Stallman, 2005/09/28
- Re: jit-lock refontifies too much, Stefan Monnier, 2005/09/27
- Re: jit-lock refontifies too much, martin rudalics, 2005/09/28
- Re: jit-lock refontifies too much, Stefan Monnier, 2005/09/28
- Re: jit-lock refontifies too much, martin rudalics, 2005/09/29
- Re: jit-lock refontifies too much, Stefan Monnier, 2005/09/29
- Re: jit-lock refontifies too much, Richard M. Stallman, 2005/09/24