[vim/vim] gvim (gtk3/X11) became slow since ver 9.2.0646 (Issue #20603)

3 views
Skip to first unread message

presuku

unread,
Jun 22, 2026, 8:47:30 AM (3 days ago) Jun 22
to vim/vim, Subscribed
presuku created an issue (vim/vim#20603)

Steps to reproduce

  1. ./src/vim -g src/edit.c
  2. moving window and/or scrolling file

git bisect result: 0f58fc3.

related: #18002
related: #20513

Expected behaviour

It should have the same performance as versions before 9.2.0646.

Version of Vim

9.2.699

Environment

  • Xubuntu 24.04
  • X11
  • 1920x1024
  • Nvidia GeForce RTX 4070 (Driver:580.167.08)

Logs and stack traces


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20603@github.com>

h_east

unread,
2:59 AM (5 hours ago) 2:59 AM
to vim/vim, Subscribed
h-east left a comment (vim/vim#20603)

Could you please run each of the following in your Vim and let me know the returned values?

:echo has('wayland')
:echo $WAYLAND_DISPLAY
:echo $XDG_SESSION_TYPE
:echo $GDK_BACKEND


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20603/4796673922@github.com>

presuku

unread,
4:27 AM (3 hours ago) 4:27 AM
to vim/vim, Subscribed
presuku left a comment (vim/vim#20603)

Thank you for your reply.
The command results are as follows.

:echo has('wayland')
1
:echo $WAYLAND_DISPLAY
# blank
:echo $XDG_SESSION_TYPE
X11
:echo $GDK_BACKEND
# blank


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20603/4797287889@github.com>

h_east

unread,
6:11 AM (2 hours ago) 6:11 AM
to vim/vim, Subscribed
h-east left a comment (vim/vim#20603)

Thanks — that confirms the active backend is X11 (Wayland support is compiled in,
but $WAYLAND_DISPLAY is empty and the session is X11, so GTK3 is using the X11
backend).

9.2.0646 changed the offscreen drawing surface from CAIRO_CONTENT_COLOR_ALPHA
to CAIRO_CONTENT_COLOR (no alpha). On X11 this matters when the gvim window
uses a 32-bit (ARGB) visual: an alpha-less surface no longer matches the window's
format, so copying it to the window can fall off the fast same-format path. That
fits "fast before 9.2.0646, slow after" on an X11 + GPU setup.

To shape the fix (keep COLOR on Wayland, but match the window's format on X11),
two cheap checks would help:

  1. The window's visual depth. Run xwininfo, click the gvim window, and report
    the Depth: line (24 or 32).
  2. Whether a compositor is active. On Xubuntu/xfwm4:
    xfconf-query -c xfwm4 -p /general/use_compositing.

If the window is depth 32, that pins it down: the alpha-less surface from
9.2.0646 no longer matches the ARGB window, which is what costs the fast blit.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20603/4798114898@github.com>

presuku

unread,
6:45 AM (1 hour ago) 6:45 AM
to vim/vim, Subscribed
presuku left a comment (vim/vim#20603)

In my opinion, if gvim only uses X11 and does not need Wayland support, it should be fine to continue using CAIRO_CONTENT_COLOR_ALPHA as before...

The results of the command below.

  1. Depth: is 24.
xwininfo: Window id: 0x7000003 "[No Name] - GVIM2"

  Absolute upper-left X:  1003
  Absolute upper-left Y:  102
  Relative upper-left X:  1
  Relative upper-left Y:  26
  Width: 916
  Height: 973
  Depth: 24
  Visual: 0x2b
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x7000002 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +1003+102  -1+102  -1-5  +1003-5
  -geometry 114x56-0-0
$ xfconf-query -c xfwm4 -p /general/use_compositing
true


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20603/4798377576@github.com>

h_east

unread,
7:40 AM (7 minutes ago) 7:40 AM
to vim/vim, Subscribed
h-east left a comment (vim/vim#20603)

I have created a PR that applies the change from 9.2.0646 only when the backend is Wayland.
I would appreciate it if you could verify the behavior.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20603/4798809616@github.com>

Reply all
Reply to author
Forward
0 new messages