Monday, July 17, 2023

Re: Improving vim startuptime

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

--
--
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/CAON-T_gbPDvsNR9DRDF6Dy%2BdLF8zfzGYRBE1BsiCa7PmGpz6nA%40mail.gmail.com.

Re: Improving vim startuptime

hi,

On Sun, 16 Jul 2023 at 21:40, Manas <manas18244@iiitd.ac.in> wrote:
> ...
> But still yours is at 64ms and mine at 200ms. ...
> Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -pthread -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/vim/src=/usr/src/debug/vim -flto=auto -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1

long shot. I have noticed (or so I think, never sat down to .. time
things :-)) that programs appear to start up a little faster when
compiled with the '-fPIC' flag ? (may, of course, be just an artefact
of the machine's configuration)

--
regards, jr.

You have the right to free speech, as long as you're not dumb enough
to actually try it.
(The Clash 'Know Your Rights')

this email is intended only for the addressee(s) and may contain
confidential information. if you are not the intended recipient, you
are hereby notified that any use of this email, its dissemination,
distribution, and/or copying without prior written consent is
prohibited.

--
--
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/CAM-dBgrh0RzgMY-DZN9AF3XOZwX0_-W9Stc1H9z7ShPO_yrA9w%40mail.gmail.com.

Re: Improving vim startuptime

On Mon, Jul 17, 2023 at 12:08:46PM +0200, Christian Brabandt wrote:
>
> On Mo, 17 Jul 2023, Manas wrote:
>
> > $ time vim -cq
> >
> > real 0m0.396s
> > user 0m0.346s
> > sys 0m0.047s
>
> So now that you are at .3s startup time, is this okay or not?
It is okay but I am doing refactoring nonetheless.

--
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/q766jqgovl3xbwqvisfuttlngl4bjfazaycgtpz25nqk3yjyws%40loriycqvfeuh.

Re: Improving vim startuptime

On Mon, Jul 17, 2023 at 12:06:55PM +0200, Christian Brabandt wrote:
> I have never heard about hyperfineน before, but it always seems to spawn
> a new shell and even so it is supposed to correct the shell spawning
> time, perhaps there is something going wrong? I would try using `-N` to
> disable the intermediate shell and probably open a new ticket about
> this.
>
Not spawing shell doesn't help either. Anyways I have filed a ticket.
https://github.com/sharkdp/hyperfine/issues/666

Also, previous logs are expired so I re-created those logs and put them
on gist.[1][2]

[1] startuptime: https://gist.github.com/weirdsmiley/19cc04445f8b0a37206b98de53e58339
[2] strace.out: https://gist.github.com/weirdsmiley/8a0f70efa7bf93d69181c7bf03e3a2bb

--
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/ilh7ym7i2c4eprt25wistd7qy4zy3gmc65xvwubsqon7p2o573%40ecwhldpa7uzh.

Re: Improving vim startuptime

On Mo, 17 Jul 2023, Manas wrote:

> `startuptime` surprisingly shows me a mere 656ms, while hyperfine shows
> me 2.7s. I am not sure how this discrepancy is arising. Here is the full
> log. https://pastebin.mozilla.org/uTrJ7i8N

HTTP 404 Snippet not found

Best,
Christian
--
Dem Alltagsstreß kannst Du entgeh'n.
wenn Du vermeidest aufzusteh'n.

--
--
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/ZLUTlDV2LPdwAcdX%40256bit.org.

Re: Improving vim startuptime

On Mo, 17 Jul 2023, Manas wrote:

> $ time vim -cq
>
> real 0m0.396s
> user 0m0.346s
> sys 0m0.047s

So now that you are at .3s startup time, is this okay or not?

Best
Christian
--
Kleine Seelen fühlen in ihrem Unglück nur ihren Zustand, große noch
Zusammenhang, ihr Ich.
-- Jean Paul

--
--
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/ZLUTLhgfQdELY25O%40256bit.org.

Re: Improving vim startuptime

On So, 16 Jul 2023, Gary Johnson wrote:

> On 2023-07-17, Manas wrote:
> > $ hyperfine "vim -N -u NONE -i NONE -X -cq"
> > Benchmark 1: vim -N -u NONE -i NONE -X -cq
> > Time (mean ± σ): 2.047 s ± 0.006 s [User: 0.032 s, System: 0.010 s]
> > Range (min … max): 2.039 s … 2.056 s 10 runs
>
> Interesting! That's crazy. It should not take nearly that long to
> execute that last command. Vim is not doing anything but starting
> without loading any files, then immediately exiting.
>
> Is that what you observe without using hyperfine?
>
> I've never used hyperfine; I've just read about it since your post.
> I usually run a command with the time command, throw away the first
> run because it includes the time time to fill caches, then average
> the next three.

I have never heard about hyperfine¹ before, but it always seems to spawn
a new shell and even so it is supposed to correct the shell spawning
time, perhaps there is something going wrong? I would try using `-N` to
disable the intermediate shell and probably open a new ticket about
this.

¹https://github.com/sharkdp/hyperfine

Best,
Christian
--
Leute, die immer nur mitfahren, sind stolz darauf, keine Unfälle zu
verschulden.
-- Gabriel Laub

--
--
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/ZLUSv1KLduK6EyBj%40256bit.org.