From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "John Wiegley" Newsgroups: gmane.emacs.bugs Subject: bug#39790: 26.3; Painting text on macOS has becoming unbearably slow Date: Tue, 25 Feb 2020 10:39:36 -0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="110760"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin) Cc: Alan Third To: 39790@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 25 19:41:28 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j6f95-000ShR-GZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Feb 2020 19:41:27 +0100 Original-Received: from localhost ([::1]:33742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6f94-0001FW-If for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Feb 2020 13:41:26 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43880) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6f7k-0008Vl-5d for bug-gnu-emacs@gnu.org; Tue, 25 Feb 2020 13:40:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6f7i-0006mW-QV for bug-gnu-emacs@gnu.org; Tue, 25 Feb 2020 13:40:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50138) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6f7i-0006mL-Mu for bug-gnu-emacs@gnu.org; Tue, 25 Feb 2020 13:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j6f7i-0000we-JN for bug-gnu-emacs@gnu.org; Tue, 25 Feb 2020 13:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "John Wiegley" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Feb 2020 18:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39790 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15826559893604 (code B ref -1); Tue, 25 Feb 2020 18:40:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Feb 2020 18:39:49 +0000 Original-Received: from localhost ([127.0.0.1]:56111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j6f7V-0000w3-Gc for submit@debbugs.gnu.org; Tue, 25 Feb 2020 13:39:49 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:50508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j6f7T-0000vw-NJ for submit@debbugs.gnu.org; Tue, 25 Feb 2020 13:39:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43230) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6f7S-00086n-5i for bug-gnu-emacs@gnu.org; Tue, 25 Feb 2020 13:39:47 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j6f7Q-0006RI-Mb; Tue, 25 Feb 2020 13:39:45 -0500 Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:50173) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1j6f7P-0006zU-8X; Tue, 25 Feb 2020 13:39:43 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 96C6A22106; Tue, 25 Feb 2020 13:39:42 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 25 Feb 2020 13:39:42 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrledvgdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgfgggtsehttdertddtredtnecuhfhrohhmpedflfhohhhnucgh ihgvghhlvgihfdcuoehjohhhnhifsehgnhhurdhorhhgqeenucffohhmrghinhepnhgvfi grrhhtihhsrghnshdrtghomhenucfkphepjeeirddvfeegrdeiledrudegleenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhhnhifodhmvg hsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeikeejkedtleeggedqudejjeehfeek udeiqdhjohhhnhifpeepghhnuhdrohhrghesnhgvfigrrhhtihhsrghnshdrtghomh X-ME-Proxy: Original-Received: from localhost (76-234-69-149.lightspeed.frokca.sbcglobal.net [76.234.69.149]) by mail.messagingengine.com (Postfix) with ESMTPA id B14A33060FDD; Tue, 25 Feb 2020 13:39:41 -0500 (EST) Mail-Followup-To: bug-gnu-emacs@gnu.org, Alan Third , Eli Zaretskii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:176473 Archived-At: I use Emacs master as a dedicated ERC application window on macOS 10.15 (Catalina). I've found that with current master (at least, up to the commit before the "no text" bug I reported earlier), text redisplays *very very* slowly. In fact, I can type faster than Emacs can display letters to me, hearkening back to ye olde days of 110 baud modems. I've done a Git bisect and discovered that this slow text behavior was introduced in one of two commits. Since one of these does not compile, I could not identify which one specifically, but it's either of: 3ad7813296760cecfd3fd35a5fb47930d61a573d f674c905dc98a4617c40c4bc115462b4ad2ebfc2 Thus, 3ad7813296^ has fast text, as I've grown to expect, while f674c905dc has very slow text. The two commits are described as follows: commit 3ad7813296760cecfd3fd35a5fb47930d61a573d (HEAD, refs/bisect/skip-3ad7813296760cecfd3fd35a5fb> Author: Alan Third Date: Sun Jul 28 15:19:19 2019 +0100 Revert "Make all NS drawing be done from drawRect" This reverts commit 7946445962372c4255180af45cb7c857f1b0b5fa. commit f674c905dc98a4617c40c4bc115462b4ad2ebfc2 (refs/bisect/bad) Author: Alan Third Date: Sun Feb 10 10:59:29 2019 +0000 Draw to offscreen buffer on macOS * src/nsfns.m (x_set_background_color): Clear the frame after changing the background color, not before. * src/nsterm.h (drawingBuffer): New variable. ([EmacsView focusOnDrawingBuffer]): ([EmacsView copyRect:to:]): ([EmacsView createDrawingBufferWithRect:]): New methods. * src/nsterm.m (ns_update_begin): (ns_update_end): (ns_focus): (ns_unfocus): Handle drawing to offscreen buffer. (ns_clip_to_row): Use ns_row_rect. (ns_copy_bits): Remove unused function. (ns_scroll_run): (ns_shift_glyphs_for_insert): Use new scrolling method. (ns_draw_fringe_bitmap): (ns_dumpglyphs_image): When drawing to the offscreen buffer, flip images so they appear the right way up. (ns_dumpglyphs_stretch): Remove unnecessary code. (ns_draw_window_cursor): Don't disable screen updates. ([EmacsView updateFrameSize:]): Update the size of the offscreen buffer. ([EmacsView initFrameFromEmacs:]): Create offscreen buffer. ([EmacsView windowDidChangeBackingProperties:]): ([EmacsView createDrawingBufferWithRect:]): ([EmacsView focusOnDrawingBuffer]): ([EmacsView copyRect]): New methods. ([EmacsView viewWillDraw]): Remove method as it no longer does anything useful. ([EmacsView drawRect:]): Handle drawing from offscreen buffer. Were a betting man, I'd guess the latter was the cause... -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2