vim-gtk3 on WSL 2 Ubuntu 20.04 in Windows 11

Asked by Suresh Govindachar

WSL 2 Ubuntu 20.04 inside Microsot Windows 11:

Working within the gvim (e.g., issuing the command :ls within gvim) of (A) has very fast response; same command within gvim of (B) is very sluggish (e.g., output list of :ls comes out very slowly).

A) $ sudo apt-get install vim-gtk3
   # VIM - Vi IMproved 8.1 (2018 May 18, compiled Feb 01 2022 09:16:32)
   # Included patches: 1-2269, 3612, 3625, 3669, 3741
   # Modified by <email address hidden> #<-- what was done here?
   # Compiled by <email address hidden>
   # Huge version with GTK3 GUI.
   $ gvim

B) # git clone https://github.com/vim/vim.git ; cd vim/src
   $ make clean
   $ make distclean
   $ ./configure --prefix=/opt/vim --enable-gui --enable-gui=gtk3 --with-features=huge
   $ make && make test
   $ sudo make install
   $ /opt/vim/bin/gvim

Question: what patches need to be applied to vim's sources and how must it be built to mimic what was done for the default vim-gtk3 installed by apt?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu vim Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

If the Ubuntu version works better, why bother about the speed of a foreign version?
If the program from https://github.com/vim/vim.git has a problem, then please ask there.

Remarks:

The version in Ubuntu 20.04 is 8.1 and the version on github is 9.0, Maybe that causes the difference.

You can download the source, patches and compilation options for the version in Ubuntu from https://launchpad.net/ubuntu/+source/vim
Either download the files manually (the relevant source files are vim_8.1.2269.orig.tar.gz and vim_8.1.2269-1ubuntu5.7.debian.tar.xz) or download the source to your system with the command "apt source vim" (after enabling "deb-src" repositories in your package management system).

Revision history for this message
James McCoy (jamessan) said :
#2

Compare the "Compilation:" lines from "vim --version". The faster one was probably built with compiler optimizations ("-O2").

Can you help with this problem?

Provide an answer of your own, or ask Suresh Govindachar for more information if necessary.

To post a message you must log in.