Dmitry Gutov<dmitry@gutov.dev> writes:
I think that there is at least one way to address long lines using
asynchronous redisplay - put a placeholder on the problematic line and
continue calculating the actual rendering in the background instead.
That will not force us to compromise between rendering time and
accuracy, as we do now, with long-line-threshold.
Until you're laid out the long line, you don't know which screen line it
will finish at, or at which height specifically (it might have images,
or taller text due to faces, etc). So you can't render the remainder of
the buffer either.
What I had in mind is the processing to happen in two stages: (1)
calculate "quick-and-dirty" layout; (2) start calculating "accurate"
layout. If calculating "accurate" layout takes long time, go ahead and
draw the "quick-and-dirty" version on the glass, while "accurate"
version continues being computed in the background.
Of course, this threshold should be configurable.
Similar approach might be used to render mode lines - render a
placeholder until it is fully calculated, keeping Emacs responsive.
I hope by "placeholder" you mean the previous rendered image of it.
More precisely, what I had in mind is the old glyph matrix + some
indication that the rendering is not up-to-date (like classic sand clock
icon)