Monday, July 17, 2023

Re: Improving vim startuptime

On Mon, Jul 17, 2023 at 05:07:02PM +0200, Dominique Pellé wrote:
> Manas <manas18244@iiitd.ac.in> wrote:
>
> > > > $ time vim -cq
> > > >
> > > > real 0m0.396s
> > > > user 0m0.346s
> > > > sys 0m0.047s
>
> It seems a bit slow.
>
> For me on xubuntu-22.04 (i7-8700K):
> $ time vim -cq
>
> real 0m0.129s
> user 0m0.106s
> sys 0m0.023s
>
> and on macOS-13.4.1 (M1):
> $ time vim -cq
>
> real 0m0.109s
> user 0m0.071s
> sys 0m0.022s
>
That might be due to different versions/features enabled. I am using
pacman's package. I posted my complete version in a previous post.

Also, David (hyperfine creator ig) found the missing 2s.
https://github.com/vim/vim/blob/4c0089d696b8d1d5dc40568f25ea5738fa5bbffb/src/main.c#L2802-L2807

Passing `/dev/null` as script file doesn't halt the execution and
instantly shows the actual startuptime.

```bash
$ hyperfine "vim -N -u NONE -i NONE -X -cq -s /dev/null"
Benchmark 1: vim -N -u NONE -i NONE -X -cq -s /dev/null
Time (mean ± σ): 36.0 ms ± 4.5 ms [User: 23.6 ms, System: 11.8 ms]
Range (min … max): 30.9 ms … 49.7 ms 79 runs
```

--
Manas

--
--
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/jklx6exiaiy3gmgsryvmis7c2cgynktyyjixpa5iu7arqhxaec%40egjup4tid22y.

No comments: