Subject: 31.0.50; PGTK Wayland exhibits more lag than X11 version

From: "Stephane Travostino" <[email-masked]>
Date: Mon, 02 Sep 2024 10:18:03 +0100

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.

In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.43, cairo version 1.18.0) of 2024-08-29 built on
toolbox.tranquility
Repository revision: b6f4ffcc106fdbc21dfea45c75fdc4f217d8f201
Repository branch: makepkg
Windowing system distributor 'The X.Org Foundation', version 11.0.12401002
System Description: Arch Linux

Configured using:
'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
--with-modules --without-m17n-flt --without-gconf
--with-native-compilation=yes --with-xinput2 --with-sound=no
--with-tree-sitter --without-gpm --without-compress-install
'--program-transform-name=s/\([ec]tags\)/\1.emacs/'
'CFLAGS=-march=native -O2 -pipe -fno-plt -fexceptions
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
-fstack-clash-protection -fcf-protection'
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  vertico-prescient-mode: t
  prescient-persist-mode: t
  marginalia-mode: t
  vertico-mode: t
  consult-notes-denote-mode: t
  denote-menu-bar-mode: t
  whole-line-or-region-global-mode: t
  whole-line-or-region-local-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  server-mode: t
  midnight-mode: t
  delete-selection-mode: t
  global-auto-revert-mode: t
  recentf-mode: t
  super-save-mode: t
  savehist-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  direnv-mode: t
  pulsar-global-mode: t
  pulsar-mode: t
  which-key-mode: t
  winner-mode: t
  pixel-scroll-precision-mode: t
  override-global-mode: t
  gcmh-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  transient-mark-mode: (only . t)
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/var/home/sph/.emacs.d/elpa/ef-themes-1.6.1/theme-loaddefs hides /var/home/sph/.emacs.d/elpa/modus-themes-20240826.647/theme-loaddefs
/var/home/sph/.emacs.d/elpa/which-key-20240620.2145/which-key hides /usr/share/emacs/31.0.50/lisp/which-key
/var/home/sph/.emacs.d/elpa/transient-20240821.158/transient hides /usr/share/emacs/31.0.50/lisp/transient
/var/home/sph/.emacs.d/elpa/ef-themes-1.6.1/theme-loaddefs hides /usr/share/emacs/31.0.50/lisp/theme-loaddefs
/var/home/sph/.emacs.d/elpa/bind-key-20230203.2004/bind-key hides /usr/share/emacs/31.0.50/lisp/bind-key
/var/home/sph/.emacs.d/elpa/use-package-20230426.2324/use-package hides /usr/share/emacs/31.0.50/lisp/use-package/use-package
/var/home/sph/.emacs.d/elpa/use-package-20230426.2324/use-package-lint hides /usr/share/emacs/31.0.50/lisp/use-package/use-package-lint
/var/home/sph/.emacs.d/elpa/use-package-20230426.2324/use-package-jump hides /usr/share/emacs/31.0.50/lisp/use-package/use-package-jump
/var/home/sph/.emacs.d/elpa/use-package-20230426.2324/use-package-ensure hides /usr/share/emacs/31.0.50/lisp/use-package/use-package-ensure
/var/home/sph/.emacs.d/elpa/use-package-20230426.2324/use-package-diminish hides /usr/share/emacs/31.0.50/lisp/use-package/use-package-diminish
/var/home/sph/.emacs.d/elpa/use-package-20230426.2324/use-package-delight hides /usr/share/emacs/31.0.50/lisp/use-package/use-package-delight
/var/home/sph/.emacs.d/elpa/use-package-20230426.2324/use-package-core hides /usr/share/emacs/31.0.50/lisp/use-package/use-package-core
/var/home/sph/.emacs.d/elpa/use-package-20230426.2324/use-package-bind-key hides /usr/share/emacs/31.0.50/lisp/use-package/use-package-bind-key
/usr/share/emacs/site-lisp/xscheme hides /usr/share/emacs/31.0.50/lisp/progmodes/xscheme
/var/home/sph/.emacs.d/elpa/idlwave-6.5.1/idlwave hides /usr/share/emacs/31.0.50/lisp/progmodes/idlwave
/var/home/sph/.emacs.d/elpa/idlwave-6.5.1/idlw-toolbar hides /usr/share/emacs/31.0.50/lisp/progmodes/idlw-toolbar
/var/home/sph/.emacs.d/elpa/idlwave-6.5.1/idlw-shell hides /usr/share/emacs/31.0.50/lisp/progmodes/idlw-shell
/var/home/sph/.emacs.d/elpa/idlwave-6.5.1/idlw-help hides /usr/share/emacs/31.0.50/lisp/progmodes/idlw-help
/var/home/sph/.emacs.d/elpa/idlwave-6.5.1/idlw-complete-structtag hides /usr/share/emacs/31.0.50/lisp/progmodes/idlw-complete-structtag
/var/home/sph/.emacs.d/elpa/heex-ts-mode-20240113.1104/heex-ts-mode hides /usr/share/emacs/31.0.50/lisp/progmodes/heex-ts-mode
/var/home/sph/.emacs.d/elpa/elixir-ts-mode-20240116.645/elixir-ts-mode hides /usr/share/emacs/31.0.50/lisp/progmodes/elixir-ts-mode
/var/home/sph/.emacs.d/elpa/faceup-20170925.1946/faceup hides /usr/share/emacs/31.0.50/lisp/emacs-lisp/faceup

Features:
(shadow sort mail-extr emacsbug avy-zap mule-util helpful cc-langs trace
cl-print edebug f elisp-refs s ps-mode vc-svn two-column
vertico-directory vc-git vc-dispatcher flymake-shellcheck misearch
multi-isearch flymake-cc elec-pair cap-words superword subword
dtrt-indent advice company-yasnippet company-files company-capf company
make-mode org-indent oc-basic org-element org-persist org-id org-refile
org-element-ast inline avl-tree ol-eww eww url-queue mm-url ol-rmail
ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu mml2015 mm-view
mml-smime smime dig gnus-sum shr pixel-fill kinsoku url-file svg
gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail
mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win gnus
nnheader range ol-docview doc-view jka-compr image-mode exif ol-bibtex
bibtex ol-bbdb ol-w3m ol-doi org-link-doi crux sph-src-boon
sph-src-completion vertico-prescient prescient char-fold hotfuzz
marginalia vertico sph-src-consult sph-src-denote consult-notes-denote
consult-notes consult denote sph-dired dired-x sph-editing ws-butler
whole-line-or-region avy sph-src-eglot eglot external-completion jsonrpc
flymake ert ewoc debug backtrace sph-src-evil sph-src-format
sph-src-keybinds sph-src-lang-c sph-src-lang-elixir sph-src-lang-go
go-ts-mode go-mode find-file ffap sph-src-lang-html sgml-mode facemenu
dom sph-src-lang-javascript sph-src-lang-nim nim-mode commenter nim-fill
nim-smie nim-helper nim-util nim-syntax nim-rx nim-vars
sph-src-lang-odin odin-mode js c-ts-common cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
sph-src-lang-php sph-src-lang-rust sph-src-langs sph-src-paredit
geiser-mit geiser-guile info-look geiser geiser-debug geiser-repl
geiser-image geiser-capf geiser-doc geiser-menu geiser-autodoc
geiser-edit etags fileloop generator xref geiser-completion geiser-eval
geiser-connection tq geiser-syntax scheme geiser-impl help-fns
radix-tree geiser-log geiser-popup view geiser-custom geiser-base
parinfer-rust-mode parinfer-rust-changes parinfer-rust
parinfer-rust-helper sph-src-magit forge-repos forge-tablist hl-line
forge-topics forge-commands forge-semi forge-bitbucket buck forge-gogs
gogs forge-gitea gtea forge-gitlab glab forge-github ghub-graphql treepy
gsexp ghub url-http url-gw nsm url-auth let-alist gnutls forge-notify
forge-revnote forge-pullreq forge-issue forge-topic yaml eieio-custom
bug-reference forge-post markdown-mode edit-indirect forge-repo forge
forge-core forge-db closql emacsql-sqlite-common emacsql
emacsql-compiler eieio-base magit-bookmark magit-submodule magit-blame
magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch
magit-clone magit-remote magit-commit magit-sequence magit-notes
magit-worktree magit-tag magit-merge magit-branch magit-reset
magit-files magit-refs magit-status magit magit-repos magit-apply
magit-wip magit-log which-func imenu magit-diff smerge-mode diff
git-commit log-edit message sendmail yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils
mailheader pcvs-util add-log magit-core magit-autorevert magit-margin
magit-transient magit-process with-editor server magit-mode transient
benchmark magit-git magit-base magit-section cursor-sensor crm compat
sph-src-misc midnight vundo re-builder delsel autorevert filenotify
recentf tree-widget comp comp-cstr warnings super-save savehist
sph-src-org org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-src sh-script smie treesit executable ob-comint org-pcomplete
org-list org-footnote org-faces org-entities noutline outline
ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold
org-fold-core org-keys oc org-loaddefs thingatpt cal-menu calendar
cal-loaddefs org-version org-compat org-macs sph-src-programming
yasnippet direnv diff-mode track-changes dash sph-src-project project
sph-src-prose languagetool languagetool-server languagetool-console
languagetool-java languagetool-issue languagetool-correction
languagetool-core ispell sph-terminal vterm bookmark face-remap compile
text-property-search term disp-table ehelp find-func vterm-module
term/xterm xterm sph-src-theme modus-vivendi-tritanopia-theme
modus-operandi-tritanopia-theme modus-vivendi-deuteranopia-theme
modus-operandi-deuteranopia-theme modus-vivendi-tinted-theme
modus-operandi-tinted-theme modus-vivendi-theme modus-operandi-theme
modus-themes dbus comp-run comp-common xml sph-src-tramp tramp trampver
tramp-integration files-x tramp-message tramp-compat xdg shell pcomplete
comint ansi-osc parse-time iso8601 time-date format-spec ansi-color
tramp-loaddefs sph-src-tree-sitter sph-src-ui pulsar pulse color
which-key winner pixel-scroll cua-base ring zoom edmacro kmacro
use-package-bind-key bind-key easy-mmode rx sph-workspaces
sph-core-config sph-core-prelude gcmh cl-extra help-mode vc-use-package
use-package-ensure use-package-core cus-edit pp cus-load wid-edit
finder-inf avy-zap-autoloads avy-autoloads boon-autoloads
bufferlo-autoloads company-autoloads consult-notes-autoloads
consult-project-extra-autoloads consult-autoloads crux-autoloads
deft-autoloads denote-autoloads dired-sidebar-autoloads
dired-subtree-autoloads dired-hacks-utils-autoloads direnv-autoloads
dtrt-indent-autoloads eat-autoloads ef-themes-autoloads
eglot-booster-autoloads elixir-ts-mode-autoloads expand-region-autoloads
faceup-autoloads flymake-shellcheck-autoloads forge-autoloads
closql-autoloads emacsql-autoloads format-all-autoloads
forth-mode-autoloads gcmh-autoloads geiser-guile-autoloads
geiser-mit-autoloads geiser-autoloads ghub-autoloads go-mode-autoloads
heex-ts-mode-autoloads helpful-autoloads elisp-refs-autoloads
f-autoloads hotfuzz-autoloads howm-autoloads idlwave-autoloads
inheritenv-autoloads just-mode-autoloads langtool-autoloads
language-id-autoloads languagetool-autoloads lua-mode-autoloads
magit-autoloads pcase git-commit-autoloads magit-section-autoloads
dash-autoloads marginalia-autoloads markdown-mode-autoloads
modus-themes-autoloads multiple-cursors-autoloads nim-mode-autoloads
flycheck-nimsuggest-autoloads flycheck-autoloads commenter-autoloads
epc-autoloads ctable-autoloads concurrent-autoloads deferred-autoloads
olivetti-autoloads paredit-autoloads parinfer-rust-mode-autoloads
php-mode-autoloads pulsar-autoloads rust-mode-autoloads s-autoloads
super-save-autoloads transient-autoloads treepy-autoloads try-autoloads
use-package-autoloads bind-key-autoloads vc-use-package-autoloads
vertico-prescient-autoloads vertico-autoloads prescient-autoloads
vterm-autoloads vue-mode-autoloads edit-indirect-autoloads
ssass-mode-autoloads vue-html-mode-autoloads mmm-mode-autoloads
vundo-autoloads web-mode-autoloads which-key-autoloads
whole-line-or-region-autoloads info with-editor-autoloads
ws-butler-autoloads yaml-autoloads yaml-mode-autoloads
yasnippet-autoloads zoom-autoloads package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs icons password-cache json
subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib
rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode
register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process native-compile emacs)

Memory information:
((conses 16 1142139 1538133) (symbols 48 70089 4)
(strings 32 338997 58702) (string-bytes 1 9668153)
(vectors 16 206510) (vector-slots 8 4151356 115944)
(floats 8 1793 5011) (intervals 56 1711 666) (buffers 992 20))