From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 5c9304e: Disable some display optimizations when frames need redisplay Date: Fri, 02 Oct 2015 16:55:00 -0400 Message-ID: References: <20150930193450.11644.62040@vcs.savannah.gnu.org> <831tdd75i3.fsf@gnu.org> <83eghd5ff2.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1443819506 2506 80.91.229.3 (2 Oct 2015 20:58:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Oct 2015 20:58:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 02 22:58:16 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zi7PB-0007J1-ER for ged-emacs-devel@m.gmane.org; Fri, 02 Oct 2015 22:58:13 +0200 Original-Received: from localhost ([::1]:35165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi7PA-000796-Rv for ged-emacs-devel@m.gmane.org; Fri, 02 Oct 2015 16:58:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi7MA-0006dK-7p for emacs-devel@gnu.org; Fri, 02 Oct 2015 16:55:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zi7M9-0005eN-Eh for emacs-devel@gnu.org; Fri, 02 Oct 2015 16:55:06 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:16639) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi7M5-0005VS-Jz; Fri, 02 Oct 2015 16:55:01 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CYDQA731xV/wihxEVcgxCEAshgBAICgTw8EQEBAQEBAQGBCkEFg10BAQMBJy8jBQsLNBIUGA0kiDcIzyMBAQEBBgEBAQEeizqFBQeELQWzP4FFI4I7gVkigngBAQE X-IPAS-Result: A0CYDQA731xV/wihxEVcgxCEAshgBAICgTw8EQEBAQEBAQGBCkEFg10BAQMBJy8jBQsLNBIUGA0kiDcIzyMBAQEBBgEBAQEeizqFBQeELQWzP4FFI4I7gVkigngBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="167071517" Original-Received: from 69-196-161-8.dsl.teksavvy.com (HELO pastel.home) ([69.196.161.8]) by ironport2-out.teksavvy.com with ESMTP; 02 Oct 2015 16:55:00 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id B1BC662817; Fri, 2 Oct 2015 16:55:00 -0400 (EDT) In-Reply-To: <83eghd5ff2.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 02 Oct 2015 20:49:37 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:190746 Archived-At: >> >> So, what am I missing? >> > The setting of windows_or_buffers_changed in fset_redisplay can now be >> > removed. >> Why would we want to do that? > Because a global variable cannot possibly convey the information that > only frames F1 and F2 need to be redisplayed. Only frame-specific > variables can do that. I know. But the way windows_or_buffers_changed works, currently it has 3 possible values: - 0: only the selected-window needs to be redisplayed. - 2: all frames/windows/buffers which have the `redisplay' bit set need to be redisplayed - >2: all frames&windows need to be redisplayed. So, the value 2 (aka REDISPLAY_SOME) already gives you the information that "only frames F1 and F2 need to be redisplayed". > IOW, when 2 out of 200 frames need to be redisplayed, there's no > reason for us to attempt redisplaying all the 200. 100% agreement, and that's why I introduced those `redisplay' bits and the corresponding REDISPLAY_SOME value for windows_or_buffers_changed. And AFAIK it already has the effect that when we call fset_redisplay only those frames get redisplayed. Also rather than "don't set windows_or_buffers_changed in fset_redisplay", it seems like it would be safer to try and eliminate (one by one) the places where we check the value of windows_or_buffers_changed instead of checking f->redisplay or something like that. Stefan