unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>
Subject: Re: [Emacs-diffs] master 5c9304e: Disable some display optimizations when frames need redisplay
Date: Fri, 02 Oct 2015 08:44:34 -0400	[thread overview]
Message-ID: <jwvvbapo4j4.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <E1ZhN9O-00032Q-5G@vcs.savannah.gnu.org> (Eli Zaretskii's message of "Wed, 30 Sep 2015 19:34:50 +0000")

>     Disable some display optimizations when frames need redisplay
>     These optimizations were previously disabled by the
>     windows_or_buffers_changed flag, which now is not set
>     when only some frames need to be redrawn.

Hmm... I only replaced things like

   windows_or_buffers_changed = 45;

with

   fset_redisplay (f);

which internally will set windows_or_buffers_changed to 2, so as long as
windows_or_buffers_changed is treated as a boolean, the code should not
be affected.

> +  /* True means we need to redraw frames whose 'redisplay' bit is set.  */
> +  bool consider_some_frames_p = false;

Why not use "windows_or_buffers_changed == REDISPLAY_SOME" as an
equivalent condition?

>    /* Build desired matrices, and update the display.  If
> -     consider_all_windows_p, do it for all windows on all frames.
> -     Otherwise do it for selected_window, only.  */
> +     consider_all_windows_p, do it for all windows on all frames.  If
> +     a frame's 'redisplay' flag is set, do it for all windows on each
> +     such frame.  Otherwise do it for selected_window, only.  */
> 
> -  if (consider_all_windows_p)
> +  if (!consider_all_windows_p)
>      {
>        FOR_EACH_FRAME (tail, frame)
> -	XFRAME (frame)->updated_p = false;
> +	{
> +	  if (XFRAME (frame)->redisplay && XFRAME (frame) != sf)
> +	    {
> +	      consider_some_frames_p = true;
> +	      break;
> +	    }
> +	}
> +    }
> +
> +  if (consider_all_windows_p || consider_some_frames_p)
> +    {
> +      FOR_EACH_FRAME (tail, frame)
> +	{
> +	  if (XFRAME (frame)->redisplay || consider_all_windows_p)
> +	    XFRAME (frame)->updated_p = false;
> +	}

I don't understand in which kind of scenario this could make
a difference.

>        && !windows_or_buffers_changed
>        && !f->cursor_type_changed
> +      && !f->redisplay

Same here: IIUC this change should make no difference, since
setting f->redisplay also sets windows_or_buffers_changed to
a non-nil value.

>        || windows_or_buffers_changed
> +      || f->redisplay

And same again here.

> +  if (windows_or_buffers_changed || f->cursor_type_changed || f->redisplay)

And here.

So, what am I missing?


        Stefan



       reply	other threads:[~2015-10-02 12:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150930193450.11644.62040@vcs.savannah.gnu.org>
     [not found] ` <E1ZhN9O-00032Q-5G@vcs.savannah.gnu.org>
2015-10-02 12:44   ` Stefan Monnier [this message]
2015-10-02 13:40     ` [Emacs-diffs] master 5c9304e: Disable some display optimizations when frames need redisplay Eli Zaretskii
2015-10-02 15:46       ` Stefan Monnier
2015-10-02 17:49         ` Eli Zaretskii
2015-10-02 20:55           ` Stefan Monnier
2015-10-02 21:24             ` Eli Zaretskii
2015-10-03  1:05               ` Stefan Monnier
2015-10-03  7:21                 ` Eli Zaretskii
2015-10-04  2:33                   ` Stefan Monnier
2015-10-04  9:53                     ` Eli Zaretskii
2015-10-05 15:50                       ` Stefan Monnier
2015-10-05 16:57                         ` Eli Zaretskii
2015-10-05 22:46                           ` Stefan Monnier
2015-10-06  1:19                             ` Stefan Monnier
2015-10-06  7:57                             ` martin rudalics
2015-10-06 16:15                               ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwvvbapo4j4.fsf-monnier+emacsdiffs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).