gvim visual mode very slow, even with -u NONE

21 views
Skip to first unread message

John Z.

unread,
Jun 14, 2019, 3:56:38 AM6/14/19
to v...@vim.org
Hi all,
I am having problems with graphical vim since not too long ago;
terminal version works as great as always.

The problem is that it became very choppy - there's about 500ms-1s
lag between any keypress and reaction. Keypresses are queued, so if
I rapidly type, they're executed in sequence, slowly.

I am running archlinux with xmonad wm. Most of my apps run inside
urxvt, with browser (palemoon) and gvim being the only graphical
apps.
I am running the compositor (compton), but killing it changed
nothing.
The hardware is nothing spectacular, 4y old laptop.

What follows is list of things I tried before posting here:

* updating my system, rebooting. No change.
* vim -g -u NONE -U NONE. No change.
* killing all other apps. No change.
* comparing vim vs. vim -g. Terminal version runs normally.
* strace $(pidof gvim). A gigazillion of failed recvmsg calls and
few istats. I assumed this is normal behavior because it happens
in terminal version too.
* research on open issues: stackoverflow, stackexchange, vim wiki.
Followed advice on changing fonts, didn't help. I don't use cursor
lines and columns.
* asked on #vim on Freenode. Got told to try with -u NONE, and try
disabling compositor. Didn't help.
* ldd vim to check which libs are used, went to check libpango and
libcairo bug trackers for potential issues. Didn't find anything.


I am not sure what is causing the issue. I found an advice to try
alternative builds of gvim (using Athena), but before going down
that road I'd like to try and see if I can fix this, especially
because it might be affecting other parts of my system too - its
just that the only symptom I see is in gvim.

I don't know what else might be relevant. If there's anything,
please ask.

Sincerely,


--
"That gum you like is going to come back in style."

John Z.

unread,
Jun 14, 2019, 3:56:38 AM6/14/19
to v...@vim.org
P.S. I'm sending this mail second time, first time being yesterday; I
haven't seen the first one pop up, but if it did and I'm spamming,
I'm real sorry, its not out of malice, but ignorance.

Bram Moolenaar

unread,
Jun 14, 2019, 7:12:50 AM6/14/19
to vim...@googlegroups.com, John Z., v...@vim.org
What system is this on? Some kind of Linux?
What GUI are you using?

Since it works OK in the terminal version the selection mechanism
probably works OK. But having half a second for updating the
highlighting is unlikely. Can't guess what the problem is.

--
hundred-and-one symptoms of being an internet addict:
171. You invent another person and chat with yourself in empty chat rooms.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Dominique Pellé

unread,
Jun 14, 2019, 8:16:46 AM6/14/19
to Vim List, v...@vim.org
John Z. wrote:

> Hi all,
> I am having problems with graphical vim since not too long ago;
> terminal version works as great as always.
>
> The problem is that it became very choppy - there's about 500ms-1s
> lag between any keypress and reaction. Keypresses are queued, so if
> I rapidly type, they're executed in sequence, slowly.

I recall experiencing something similar many years ago.
gvim (gtk2) was sluggish and vim in terminal was fast.
Refreshing the screen was slow when pressing page-down
Changing my video driver on Linux fixed it somehow.
I don't have more details, it was a long time ago.
I'm not sure if it's the same kind that you have.

Regards
Dominique

John Zezelic

unread,
Jun 14, 2019, 10:51:44 AM6/14/19
to vim_use
Hi Mr. Moolenaar,

> What system is this on? Some kind of Linux?
> What GUI are you using?

I'm running Archlinux, with xmonad window manager, and generally as lean system as I can.
When you ask what GUI, I am not sure what you mean.

> Since it works OK in the terminal version the selection mechanism
> probably works OK. But having half a second for updating the
> highlighting is unlikely. Can't guess what the problem is.

That's what I thought, too. Do you have any tips on how could I trace/profile vim, to get an insight on what is causing the hiccups? I'm thinking, if it gets stuck inside library call, maybe I can at least pinpoint which one and then research further.

John Zezelic

unread,
Jun 14, 2019, 10:51:58 AM6/14/19
to vim_use
> I recall experiencing something similar many years ago.
> gvim (gtk2) was sluggish and vim in terminal was fast.
> Refreshing the screen was slow when pressing page-down
> Changing my video driver on Linux fixed it somehow.
> I don't have more details, it was a long time ago.
> I'm not sure if it's the same kind that you have.

Hi Dominique,
I had similar idea, and thankfully I have a separate GPU in my laptop, so I tried running gvim using 'optirun' (which would -I believe- force it to use a different driver), but I experienced same issues.
Reply all
Reply to author
Forward
0 new messages