GNU bug report logs - #59265
27.1; emacs apparently redraws the entire X window for every update

Previous Next

Package: emacs;

Reported by: Francesco Potortì <pot <at> gnu.org>

Date: Mon, 14 Nov 2022 23:15:09 UTC

Severity: normal

Tags: notabug

Found in version 27.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Po Lu <luangruo <at> yahoo.com>
To: Francesco Potortì <pot <at> gnu.org>
Cc: 59265 <at> debbugs.gnu.org
Subject: bug#59265: 27.1; emacs apparently redraws the entire X window for every update
Date: Tue, 15 Nov 2022 08:46:53 +0800
Francesco Potortì <pot <at> gnu.org> 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.




This bug report was last modified 2 years and 182 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.