From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Stephane Travostino" Newsgroups: gmane.emacs.bugs Subject: bug#72960: 31.0.50; PGTK Wayland exhibits more lag than X11 version Date: Tue, 03 Sep 2024 12:27:09 +0100 Message-ID: <6985778c-712c-48ff-be6d-d5c8cbfd30f5@app.fastmail.com> References: <4086d678-7a60-4b87-8c73-c5c9939f05e8@app.fastmail.com> <86mskq8dlm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21459"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72960@debbugs.gnu.org To: "Eli Zaretskii" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 03 14:57:19 2024 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 1slT5y-0005JU-UU for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 Sep 2024 14:57:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slT5o-00045Y-0A; Tue, 03 Sep 2024 08:57:08 -0400 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 1slT5h-00044z-1i for bug-gnu-emacs@gnu.org; Tue, 03 Sep 2024 08:57:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1slT5g-0000kQ-4n for bug-gnu-emacs@gnu.org; Tue, 03 Sep 2024 08:57:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:MIME-Version:To:Subject; bh=LcVz2ghsow0mm82Gb8fAQF6FUhDSpNuQxsUhcbG1cYY=; b=f+1y0qgBAzNJbaW1fgE0S+bO9J7SNWv7T7b+DnvDc0cwFnpDvas6AzXL2bDMnIMebH2ALKEG0OIIfqlSK4Hn0/YT6GFgBYmTLxvfqnvcfZ69ufk/06WnPMKOS3SLeRqmn3edwHTtZrzyQ7KvfMJ48WsLpYyGIfkfcxxHGeQ/YBJOSvUo0bl7/+KY5+kTlqfyysxwQoJAA4b53wdBF/Z0epIGdZIvJGY/vSgQOB3H64YjfNeC+05XFEOgX51vUDmwKgU3mdXVihnNIk4o2F2XIMOqXvd1M4pNxTfvPLClzCdO9IKC05dz+EaTWUbyU49wJYPt5/+zcjOl+wjJUI1TZg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1slT6g-00030k-Ad for bug-gnu-emacs@gnu.org; Tue, 03 Sep 2024 08:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Stephane Travostino" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Sep 2024 12:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72960 X-GNU-PR-Package: emacs Original-Received: via spool by 72960-submit@debbugs.gnu.org id=B72960.172536827811552 (code B ref 72960); Tue, 03 Sep 2024 12:58:02 +0000 Original-Received: (at 72960) by debbugs.gnu.org; 3 Sep 2024 12:57:58 +0000 Original-Received: from localhost ([127.0.0.1]:59429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slT6b-00030F-Jz for submit@debbugs.gnu.org; Tue, 03 Sep 2024 08:57:58 -0400 Original-Received: from fout4-smtp.messagingengine.com ([103.168.172.147]:42043 helo=pfout4-smtp.messagingengine.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slRiI-0000K1-6l for 72960@debbugs.gnu.org; Tue, 03 Sep 2024 07:30:55 -0400 Original-Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id 651DD138048A; Tue, 3 Sep 2024 07:27:30 -0400 (EDT) Original-Received: from phl-imap-10 ([10.202.2.85]) by phl-compute-03.internal (MEProxy); Tue, 03 Sep 2024 07:27:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=combo.cc; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1725362850; x=1725449250; bh=LcVz2ghsow0mm82Gb8fAQF6FUhDSpNuQxsUhcbG1cYY=; b= Awhwxzp+HRZvf+02RVxLGcCLWgctIADS97z4/hcWjkh52q3nd0L5J6Bq1EKCrDYu /41K2m4DpXIhDKnRDV/3kmTiFTxcNQh0wHChZm6CMnQ1oGMkjDmYja5HZYfoj1W9 1yImP+hg12R5+h3KdrANm0dh0s3YAXc2O0Nhd543UThtGCSs0X7+uIlMk2D49Xn6 cV20SnqpZOXfo4VklTUEjc0yqn91jtX/XElLoTWaJG6uxSuqWx04J0k1h0fhbTZg oCYuUuhc6sxW/mDaUomcJjnkVmkGos0LjRautTYk2ygeMWIRlZps+dHsoR3dsQNe 8cu7ClT65Kd0juHM+cUxSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1725362850; x= 1725449250; bh=LcVz2ghsow0mm82Gb8fAQF6FUhDSpNuQxsUhcbG1cYY=; b=T h2YREbT38Ap8EwtJnDW5jJPv43DsU7TLfF+TqTI4g/4Xqnnz4M7ki032gimYlZxX m4MHZI8euombXQ3qny4HAxDco7qMw1kG8DnzEOWjmiiRRGozoTO5E/ZXRsqHgysQ GNtU2v7eoH0e4gr9p95IZDkMepNPYUxaOvtjhqBGEQeWPWkuNG2MsdrAxX7Tww0G FQ5ZGC8v+TuQ31hw1fUCgsq72AW1VdWQEZ/v/ZfHjl2eed9YZszNfeUJSSvM/ai6 kVjM/mPABhY+a+JuSsCDIQ4wJaHX3E3L/kcPoaO/Qhl8S4cfx80oN9gPDwkN/gIQ yRtxqpJxEnlmDFzwC48Lw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudehhedggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpefoggffhffvvefk jghfufgtgfesthejredtredttdenucfhrhhomhepfdfuthgvphhhrghnvgcuvfhrrghvoh hsthhinhhofdcuoehsphhhsegtohhmsghordgttgeqnecuggftrfgrthhtvghrnhepledv tdejfedvhfdvvddukedvheffkeehfeegkeehveehfefhffelfefffefhgedvnecuffhomh grihhnpehrvgguughithdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehsphhhsegtohhmsghordgttgdpnhgspghrtghpthhtohepvd dpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjedvleeitdesuggvsggsuhhgshdr ghhnuhdrohhrghdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: i4629447b:Fastmail Original-Received: by mailuser.phl.internal (Postfix, from userid 501) id 093C83C0066; Tue, 3 Sep 2024 07:27:30 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: X-Mailman-Approved-At: Tue, 03 Sep 2024 08:57:56 -0400 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:291143 Archived-At: On Mon, 2 Sep 2024, at 13:12, Stephane Travostino wrote: > On Mon, 2 Sep 2024, at 13:05, Eli Zaretskii wrote: >>> Date: Mon, 02 Sep 2024 10:18:03 +0100 >>> From: "Stephane Travostino" >>> >>> Heavy operations, such as scrolling back and forth in a buffer, are >>> noticeably laggier, for lack of better word, in the PGTK/Wayland version >>> than the X11, both tested on KDE in Wayland mode. >>> >>> Affects both 29.2 and the latest HEAD compiled a few days ago. >>> >>> I am unsure whether it is a KDE or Emacs problem. >>> >>> Running on an AMD RX 6800 XT graphics card on a HiDPI 4k screen at 2x >>> scaling. >> >> AFAIU, this is a problem with GTK input methods. From PROBLEMS: >> >> *** Emacs built with GTK lags in its response to keyboard input. >> This can happen when input methods are used. It happens because Emacs >> behaves in an unconventional way with respect to GTK input methods: it >> registers to receive keyboard input as unprocessed key events with >> metadata (as opposed to receiving them as text strings). Most GTK >> programs use the latter approach, so some modern input methods have >> bugs and misbehave when faced with the way Emacs does it. >> >> A workaround is to set GTK_IM_MODULE=none in the environment, or maybe >> find a different input method without these problems. > > Thank you, though without more scientific methods of measuring latency > I can't tell if that helps or not. > > I noticed I had pixel precision scrolling mode on and that contributed > a large part to that feeling of lag compared to other programs. If > Firefox is able to smooth scroll at 60 Hz, I would say empirically > Emacs PGTK would scroll at 15 Hz, making navigation in the buffer a > choppy affair. Update: GTK_IM_MODULE=none does not make it any less laggier. It is mostly felt in typing and editing source code, and switching to the X11 build makes it immensely snappier and doesn't feel like I'm working through a remote connection. FYI there are other reports online of people noticing major latency in HiDPI mode with the PGTK version, especially when the frame is fullscreen (so there's more pixels to update): https://old.reddit.com/r/emacs/comments/ucv0at/awful_performance_with_pgtk_on_wayland/ https://old.reddit.com/r/emacs/comments/1acdieh/pgtk_emacs_high_input_lag_at_large_frame_sizes_on/