Subject: Re: bug#16621: 24.3.50; Periodic timer + overlays = flickering near point

From: Eli Zaretskii <[email-masked]>
Date: Tue, 04 Feb 2014 05:48:53 +0200

> Date: Tue, 04 Feb 2014 04:34:58 +0200
> From: Dmitry Gutov <[email-masked]>
> CC: [email-masked], Stefan Monnier <[email-masked]>
> 
> Isn't the fact that flickering is at all possible in this scenario, a 
> problem?

Yes, but it is currently an unavoidable one, because this is how the
code was designed and implemented to work.

> Doesn't it mean that occasional flickers can still happen under 
> normal conditions (timers with much longer intervals, for example),just 
> that the probability of occurrence is smaller. If I understand you 
> right, all it takes is for timer to fire at just the right moment before 
> the screen updates.

Indeed, that's true.

> Some relatively low-hanging fruit has already been mentioned in the 
> comments

Like what?  If you mean the fact that we redraw the cursor when
perhaps that could be avoided, someone else will have to suggest a
better algorithm than doing it on every frame update.  Nothing else
discussed here was easy, either.

> but would it be too much to expect some sort of double-buffering
> used for Emacs display, eventually?

You mean, outside Emacs?  Yes, probably, but then this isn't an Emacs
issue, and I know absolutely nothing about it.

> Or is the related overhead considered too much of a cost?

If you mean double buffering inside Emacs, you will have to explain
why you think it will solve the problem.