all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Stephane Travostino" <sph@combo.cc>, Po Lu <luangruo@yahoo.com>
Cc: 72960@debbugs.gnu.org
Subject: bug#72960: 31.0.50; PGTK Wayland exhibits more lag than X11 version
Date: Tue, 03 Sep 2024 15:52:20 +0300	[thread overview]
Message-ID: <86ikvc7vcr.fsf@gnu.org> (raw)
In-Reply-To: <6985778c-712c-48ff-be6d-d5c8cbfd30f5@app.fastmail.com> (sph@combo.cc)

> Date: Tue, 03 Sep 2024 12:27:09 +0100
> From: "Stephane Travostino" <sph@combo.cc>
> Cc: 72960@debbugs.gnu.org
> 
> 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" <sph@combo.cc>
> >>> 
> >>> 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.

Please try profiling the lagging cases with "M-x profiler", and post
the profile here.

Po Lu, any other ideas or suggestions?

> 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/

I don't doubt what you report is real.





  reply	other threads:[~2024-09-03 12:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-02  9:18 bug#72960: 31.0.50; PGTK Wayland exhibits more lag than X11 version Stephane Travostino
2024-09-02 12:05 ` Eli Zaretskii
2024-09-02 12:12   ` Stephane Travostino
2024-09-03 11:27     ` Stephane Travostino
2024-09-03 12:52       ` Eli Zaretskii [this message]
2024-09-03 15:36         ` Stephane Travostino
2024-09-03 16:01           ` Eli Zaretskii
2024-09-04  0:58             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-04  0:57         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ikvc7vcr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=72960@debbugs.gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=sph@combo.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.