From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59265: 27.1; emacs apparently redraws the entire X window for every update Date: Tue, 15 Nov 2022 08:46:53 +0800 Message-ID: <87wn7xgi2q.fsf@yahoo.com> References: <87iljhlccn.fsf@tucano.isti.cnr.it> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13319"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 59265@debbugs.gnu.org To: Francesco =?UTF-8?Q?Potort=C3=AC?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 15 01:56:21 2022 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 1oukFR-0003Bu-Ni for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 15 Nov 2022 01:56:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ouk7S-0000QI-Tb; Mon, 14 Nov 2022 19:48:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ouk7P-0000J8-74 for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2022 19:48:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ouk7O-0005Tw-DC for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2022 19:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ouk7O-0002x6-AM for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2022 19:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Nov 2022 00:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59265 X-GNU-PR-Package: emacs Original-Received: via spool by 59265-submit@debbugs.gnu.org id=B59265.166847323111200 (code B ref 59265); Tue, 15 Nov 2022 00:48:02 +0000 Original-Received: (at 59265) by debbugs.gnu.org; 15 Nov 2022 00:47:11 +0000 Original-Received: from localhost ([127.0.0.1]:52175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ouk6Y-0002ua-Q2 for submit@debbugs.gnu.org; Mon, 14 Nov 2022 19:47:11 -0500 Original-Received: from sonic309-22.consmr.mail.ne1.yahoo.com ([66.163.184.148]:37030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ouk6W-0002u6-AM for 59265@debbugs.gnu.org; Mon, 14 Nov 2022 19:47:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1668473222; bh=Q2yGSOACOlFUAT6vNjwbKWju3eSg3UV/E9FBodVJidg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=mHi9z2G7G9pEqMc0c/Nc19KiZRjO05tLFey43se6MRZtI4TTOcnd/AUIkl1Y67iSf5zYE+903UckHxEDQ4DkLZoR8EfRPe/u3GQVOw47PSSwt3P/TaWeWpTbj0epEWJb6+y8WFeDSgp0bcrBEnzmswuJ/FFfqI/4VIdmxBKhkTRDXXPYJsqmBxPlOtU8X0yfuUrv0ZiRPr3zgJIlIk+y0MzCcxJrkHqaH65N7kREc2rpMn2HR4wul3hL0mc7EfSs1z7XZ5g5proDawtE2abhV5mzY5QuoRROmf87LooaBX9xcGLmFFwdvOk7JsWv44MC7Pd8pREWKXap+6PymBR3nA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1668473222; bh=nIhgZH/5aoxS610eV1AUdIHOe/UF3JvpXhZLNZA5R59=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=PLN0juIwdwZmmsRlYT0eCKfeHk7zG8w0nX+w7EaMihux8mpY3G7mObyul1Iuq7hx4Ol0hfIh34cuIpk3SU06sqPdTHYZqnsaJS38f3NVMhhlGhRw4wSzHpG5dimlLzxYJzde+fsfkURmT5cqmRQcUoCkrWCaaKGYc8vbpSJvWioH+vcLdsi6B84s4Mv3j0kmkOBLS5WdS23zb5fLIOsyBhmU7iZdrf7FGcz/xn8GowqrVIFykzhiwxrVVAnvXPEEgsZJHCGf6TwFqwgAxllmQOfkg2+mDO+xBM6X0Snyv6486K/AD+oETm+WMcU3TDrukcVQzQfId9IxNzdqnO1UWQ== X-YMail-OSG: L1Wp5y0VM1lJK8Am805UoA5kqQzt1ZNGXpXhtspo7FXzBGrmbHVmG.a4N7ynlLS Cgbn.UGOqrkLzrpjmZoc.C723BLoqSfw847HzlHR_WE030mGDgJZAgVN_Y.2svTBvMv2oMneq3CS RCMnXTFTssSQSKetYTaa7STwuD9YScnzPUnDFUQq1uLaEi4Gks370UTh1jRTTA9_yRd4nfkjR2ix LNM.KER5UO6v4K8spVte.7J0UyQczhOtn6GB3sUooEJ6BzlapC3OUumgvwY5bHm4m3PzzDkHi0tR vXjHNTAV9cQOuKLH228peqcCq.83mG6a0S_KoaNVLqAlr_nrpyJEiI2iDoclVTXJzF..VLjYy3BK 89.DiQXI2LpH.DWg2e0fmo2de5wCegnjbrARgY7OUvwhfTfB13zsyll6fmOcvPwhquSb4b3Hnpbj OhiA6_ratGuGpgBlfTaLd9AATDLR8uXxE8ni95s_HHRnOHthdWroQc059YKC1hUbUEq_1cJNniZq .WP683Dg7khUiwGYRjYi5rH1gaqXcbYOyqJw96Bol1YTB6CIUFJZuvLawuziaytj7c2Hioo6lxvw ErwAfN_6i_8EuW2JqENZIIDmPH5y_3LqqrpaT9DdbftHSfTdOfBmsr8ifeHN4zaF.Jcuwn7o2xlt hKrSyiUKAaWdCgUGo1sn7n38mpiNXmIcCI47tuPsNlxY1p2G1qAzmsh3ycQZzYahm8FR79yga_i9 Y2vYRl57.0S.RNUHnNwb2tzwNHZnRGEKP9HxeOL9F22ucqW1Ef5yL_OZkelocsCsSxTrRK_9h1_2 6JVjF_kobGG.XQOnbmBvpb5qkCw2I06ATOA0_CiHC6 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.ne1.yahoo.com with HTTP; Tue, 15 Nov 2022 00:47:02 +0000 Original-Received: by hermes--production-sg3-6c8895b545-66t5n (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID d05cd98e3c3f8ee6689170cdf1187da5; Tue, 15 Nov 2022 00:46:58 +0000 (UTC) In-Reply-To: <87iljhlccn.fsf@tucano.isti.cnr.it> ("Francesco =?UTF-8?Q?Potort=C3=AC?="'s message of "Mon, 14 Nov 2022 17:39:20 +0100") X-Mailer: WebService/1.1.20863 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247874 Archived-At: Francesco Potort=C3=AC writes: > This bug report is vague, because I don't know the details yet, but I > should be able to produce them later. > > When using a remote window using Xpra (which is more or less > equivalent to Screen for X, see xpra.org) the amount of information > sent by Emacs is huge, apparently redrawing the entire window at every > keystroke. > > I discovered this while reporting an Xpra bug and Xpra's author > commented on this, see https://github.com/Xpra-org/xpra/issues/3660 > > While I work with him to solving the bug, I will try to get more info > on the matter, assuming this is not a known issue. If the problem is > real, that makes Emacs resource hungry when run on remote X servers. Emacs generally does not redraw the entire X window upon an update. Judging by the debug info provided in the Xpra bug report, it is relying on the Damage extension to report window damage. The Damage extension always reports damage to the entire window upon a DBE buffer swap, which is almost inconsequential when connected to an actual remote X server (I do that every day), but not when a program like Xpra tries to ferry pixmap contents over the wire. Relying on Composite and Damage to send application contents over the wire is fundamentally the wrong approach. I suspect Xpra has to be written as an X server driver (as its name applies), and that after doing so, its DBE implementation has to be fixed to only call the CopyArea GC op on areas of the back buffer that really changed. So this isn't really a bug in Emacs, sorry. You can work around the problem by turning off double buffering, but that means you will also need to put up with flicker.