all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 16621@debbugs.gnu.org
Subject: bug#16621: 24.3.50; Periodic timer + overlays = flickering near point
Date: Tue, 04 Feb 2014 04:34:58 +0200	[thread overview]
Message-ID: <52F051D2.9020404@yandex.ru> (raw)
In-Reply-To: <838utt4gff.fsf@gnu.org>

On 02.02.2014 18:39, Eli Zaretskii wrote:
> I don't think this is related to overlays, not directly anyway.

True, I've seen it without overlays, too, recently.

> No, it doesn't stop, at least not with the above recipe.  To see that,
> type "M-x trace-redisplay RET" while running the above experiment --
> on my system, this causes the flickering to become much more prominent
> and never stop, until I exit isearch and type some simple command,
> like C-f, afterwards (to remove the echo-area message).

I wanted to say there's no such function, but apparently one has to 
compile Emacs with -DGLYPH_DEBUG to use it. I'll take your word for it.

> What you see is result of redrawing the cursor at a very high
> frequency.  Normally, redrawing the cursor would only flicker the
> character below the cursor, but with some fonts, the adjacent
> characters are also affected, if the character under the cursor
> "overhangs" to the left and/or to the right into the neighboring
> character cells -- then Emacs redraws those adjacent characters as
> well.

Isn't the fact that flickering is at all possible in this scenario, a 
problem? 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.

> Why is the cursor redrawn with such a high frequency, you ask?
> Because of the timer that expires every 10 msec.  When some timer
> expires, Emacs always triggers redisplay.  If it didn't, features like
> highlight-tail could not produce their effect.

Thank you, I guess that solves the immediate problem with 
highlight-tail-mode for me (lower the amount of steps, increase the 
intervals), but one of the reasons I filed this bug is I've been 
noticing occasional redisplay flickers with Emacs for as long as I can 
remember. They are a nuisance, and until now they've been impossible to 
reproduce, for me.

> With highlight-tail-mode, I see flickering only when I type text.
> This is expected, since typing text modifies the color of the overlays
> at a very high frequency (50 Hz with your customizations), which again
> requires redrawing the current line and the cursor.  If you see
> something else with highlight-tail-mode, please describe the recipe.

I do see similar flickering from time to time after I stop typing, but 
that can be chalked up to timers too, I guess. This is also harder to 
reproduce (happens not often, and in longer-living Emacs sessions).

> All of the above is quite normal, so I don't see where there would be
> a bug.  Granted, Emacs 24.3 and Emacs 23 behave the same.

Some relatively low-hanging fruit has already been mentioned in the 
comments, but would it be too much to expect some sort of 
double-buffering used for Emacs display, eventually? Or is the related 
overhead considered too much of a cost?





  parent reply	other threads:[~2014-02-04  2:34 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-02  1:01 bug#16621: 24.3.50; Periodic timer + overlays = flickering near point Dmitry Gutov
2014-02-02  2:33 ` Stefan Monnier
2014-02-02  2:37   ` Dmitry Gutov
2014-02-02 16:39 ` Eli Zaretskii
2014-02-03  2:12   ` Stefan Monnier
2014-02-03  5:47     ` Eli Zaretskii
2014-02-03 13:41       ` Stefan Monnier
2014-02-03 16:14         ` Eli Zaretskii
2014-02-04  3:28           ` Stefan Monnier
2014-02-04  3:44             ` Eli Zaretskii
2014-02-04  2:34   ` Dmitry Gutov [this message]
2014-02-04  3:48     ` Eli Zaretskii
2014-02-04  6:17       ` Dmitry Gutov
2014-02-04 16:00         ` Eli Zaretskii
2014-02-04 22:08           ` Jan D.
2014-02-05  3:57             ` Eli Zaretskii
2014-02-05  6:02               ` Jan Djärv
2014-02-05 15:40                 ` Eli Zaretskii
2014-02-05 13:46               ` Stefan Monnier
2014-02-05 15:59                 ` Eli Zaretskii
2014-02-05 18:57                   ` Stefan Monnier
2014-02-05 20:00                     ` Eli Zaretskii
2014-02-05 21:46                       ` Stefan Monnier
2014-02-06  5:56                         ` Eli Zaretskii
2014-02-06 13:08                           ` Stefan Monnier
2014-02-06 14:20                             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52F051D2.9020404@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=16621@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.