Huge delays with gVim under Windows (Vim 8.2.5124)

28 views
Skip to first unread message

Christian J. Robinson

unread,
Jun 18, 2022, 12:00:11 PM6/18/22
to vim_dev, bu...@vim.org
At some point in the last ten patches a huge delay when starting gVim under windows was introduced. It appears to happen when reading the viminfo file:

413.000  006.000  006.000: sourcing $HOME\vimfiles\gvimrc
584.000  172.000: starting GUI
22975.000  22391.000: reading viminfo

Moving the viminfo aside fixes the problem only temporarily.

There are also big delays when running some plugins, such as ":Fern -drawer ." (https://github.com/lambdalisue/fern.vim)

--
Christian J. Robinson <hep...@gmail.com>

Christian J. Robinson

unread,
Jun 18, 2022, 12:05:56 PM6/18/22
to vim_dev, bu...@vim.org
Follow up: Removing the search string history from the viminfo file speeds up startup significantly.

Christian J. Robinson

unread,
Jun 18, 2022, 12:30:18 PM6/18/22
to vim_dev, bu...@vim.org
Turning off 'incsearch' speeds up Vim significantly both in loading the viminfo and when running ":Fern -drawer ."

Bram Moolenaar

unread,
Jun 18, 2022, 1:38:47 PM6/18/22
to vim...@googlegroups.com, Christian J. Robinson, bu...@vim.org

Christian J. Robinson wrote:

> Turning off 'incsearch' speeds up Vim significantly both in loading the
> viminfo and when running ":Fern -drawer ."

I'm not sure what is going on here. The search strings in the viminfo
file should only fill the history. I cannot spot a relation with
something that might delay it. Only a redraw later might highlight
matches and use the last used search pattern.

What is ":Fern"? Does it install autocommands or other stuff that might
get triggered? Does it use ":redraw" perhaps?


--
LARGE MAN: Who's that then?
CART DRIVER: (Grudgingly) I dunno, Must be a king.
LARGE MAN: Why?
CART DRIVER: He hasn't got shit all over him.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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

Christian J. Robinson

unread,
Jun 18, 2022, 1:48:27 PM6/18/22
to Bram Moolenaar, vim_dev, bu...@vim.org
I tried it again with 'incsearch' off and it doesn't seem to change the speed of loading the viminfo file this time, but does affect Fern, which is a directory tree browser plugin.

I can still speed up loading the viminfo by removing the search history.

Bram Moolenaar

unread,
Jun 18, 2022, 3:23:14 PM6/18/22
to vim...@googlegroups.com, Christian J. Robinson, bu...@vim.org

> I tried it again with 'incsearch' off and it doesn't seem to change the
> speed of loading the viminfo file this time, but does affect Fern, which is
> a directory tree browser plugin.
>
> I can still speed up loading the viminfo by removing the search history.

What if you only remove some entries? Perhaps it's a specific pattern
that is the problem. Either because it's slow to execute or there are
many matches.

--
If all you have is a hammer, everything looks like a nail.
When your hammer is C++, everything begins to look like a thumb.
-- Steve Hoflich, comp.lang.c++

Christian J. Robinson

unread,
Jun 18, 2022, 4:00:54 PM6/18/22
to Bram Moolenaar, vim_dev, bu...@vim.org
I was unable to narrow it down to a single entry, but when I got it reduced to about five entries Vim stopped consistently slowing down when starting, making it an intermittent problem and probably extremely hard to isolate.
Reply all
Reply to author
Forward
0 new messages