all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: ericfroemling@gmail.com, 17124@debbugs.gnu.org
Subject: bug#17124: 24.3.50; Occasional Extremely Slow Redraws in OSX Emacs
Date: Mon, 30 Jun 2014 17:45:35 +0300	[thread overview]
Message-ID: <838uoe5ucw.fsf@gnu.org> (raw)
In-Reply-To: <044D6949-2D7F-4C78-AE24-55C8885DDFCC@swipnet.se>

> From: Jan Djärv <jan.h.d@swipnet.se>
> Date: Mon, 30 Jun 2014 14:55:22 +0200
> Cc: ericfroemling@gmail.com,
>  17124@debbugs.gnu.org
> 
> >>> Does it help to set redisplay-dont-pause to nil?
> >> 
> >> The "shake the divider" case becomes much worse, lots of flickering and incomplete text.
> > 
> > But do you see less drawing requests sent to the backend?
> 
> No.

Strange.  When this variable is nil, redisplay should abandon its job
when it sees that some input is pending.

> > I actually find it hard to believe that we overwhelm the backend,
> > except, maybe, when the X client is on a remote machine.  E.g., on
> > Windows the "shake the divider" recipe doesn't show any signs of a
> > problem, and the CPU load is never more than a single execution unit
> > being busy, which means not much is at work except Emacs itself.  With
> > today's multi-core fast machines, how come it's impossible to redraw a
> > region 37 times a second?
> 
> Well, the actual number is more than 37.  37 is the number of times redisplay is called.
> But within one redisplay, there is a couple of separate update_begin/end blocks.

I'd expect one such block for every window that is affected by the
divider move.  If you see more, there's something else at work here.

> The Emacs way is really only ment for small updates outside the event loop.

Most of the updates are indeed small.

> >> I had problems seeing what was drawn and when so I added debug code to see what the font driver actually draws.  But I see now that it is different for X11.  So it might be NS specific.  What can make the modeline redraw in one version of Emacs and not in another?  I thought all that was generic code.
> > 
> > It _is_ generic code.  Perhaps we are not talking about the same
> > things: when you say that the mode line is redrawn, what exactly do
> > you see?
> 
> I see the mode line redrawn by inspecting what strings are sent to the font backend.  Actually the whole buffer is redrawn, I was just looking at an empty buffer.  But these are the extra redrawn I mentioned above, they are gone in trunk now.

So the redraws of the mode line when mouse is moved no longer happen
on the trunk?  If so, this is a good improvement.

> With the extra redrawns gone, shake the divider performes rather well now if I force draws to the event loop.  There is the occational pause in redraw, but I guess that is expected.
> But I can't do this all in the backend, the downside is that there are double redraws.  One for the redisplay call and one from the event loop when the redisplay is done.  Also, the event loop redraw redraws the whole frame.
> 
> If I get some time I'll try to make a test.

Thanks.





  reply	other threads:[~2014-06-30 14:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 21:23 bug#17124: 24.3.50; Occasional Extremely Slow Redraws in OSX Emacs Eric Froemling
2014-03-28  7:20 ` Eli Zaretskii
2014-03-28 16:19   ` Eric Froemling
2014-03-28 17:43     ` Eli Zaretskii
2014-04-01  5:23       ` Eric Froemling
2014-04-01 15:03         ` Eli Zaretskii
2014-04-01 16:57           ` Eric Froemling
2014-06-27 10:44             ` Jan Djärv
2014-06-27 13:37               ` Eli Zaretskii
2014-06-27 17:13                 ` Jan Djärv
2014-06-27 17:30                   ` Eric Froemling
2014-06-27 19:58                     ` Eli Zaretskii
2014-06-27 19:57                   ` Eli Zaretskii
2014-06-30 12:55                     ` Jan Djärv
2014-06-30 14:45                       ` Eli Zaretskii [this message]
2014-03-29 12:20 ` Jan Djärv
2015-01-27 20:09 ` Bill Sacks
2016-02-10 19:25   ` bulldozer
2016-02-10 23:29     ` Alan Third
2016-02-11  0:26       ` bulldozer
2016-02-12  5:10       ` bulldozer
2016-02-12  7:21         ` Eli Zaretskii
2016-02-12 23:54           ` Alan Third
2020-09-09 12:30             ` bug#16594: " Lars Ingebrigtsen

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=838uoe5ucw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=17124@debbugs.gnu.org \
    --cc=ericfroemling@gmail.com \
    --cc=jan.h.d@swipnet.se \
    /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.