Sunday, July 16, 2023

Re: Improving vim startuptime

On 2023-07-16, Manas wrote:
> Hey folks, today I ran hyperfine on vim and found my startuptime is way
> too slow.
>
> Benchmark 1: /usr/bin/vim
> Time (mean ± σ): 2.707 s ± 0.036 s [User: 0.598 s, System: 0.097 s]
> Range (min … max): 2.674 s … 2.779 s 10 runs
>
>
> Are there any tips on improving this?

It depends, of course, on why it is slow. You can start vim with
the --startuptime option to get a better idea of where the slowdown
is. See ":help --startuptime".

For example, starting vim on my Cygwin system was really slow
because I wrote my vimrc and some plugins as I would for Unix, where
running external programs is really fast. I re-wrote those to make
less use of external programs.

As another example, starting vim on a remote Linux machine via ssh
and X from a local Linux machine can be slow if the connection is
slow because vim communicates with the X server and the terminal on
the local machine. I don't know what to do in that case other than
be patient or start vim with -X and forgo some of the features of X.

HTH,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20230716175504.GL6600%40phoenix.

No comments:

Post a Comment