Hi,
2017/5/24 Wed 17:39:34 UTC+9 Ni Va wrote:
> Le mardi 23 mai 2017 21:46:01 UTC+2, Ni Va a écrit :
> > Le mardi 23 mai 2017 18:14:24 UTC+2, MarcWeber a écrit :
> > > > Thank you
> > > Sped up by using a plugin manager supporting lazy loading or as needed
> > > (vim-addon-manager/Neobundle maybe more).
> > >
> > > Typically sourcing twice is not a problem, often guard [1] like guard
> > > has been setup which is a quick workraound which immediately saves most
> > > time.
> > >
> > > Marc Weber
> > >
> > > [1]
> > >
> > > if exists("loaded_<name>")
> > > finish
> > > endif
> > > let loaded_<name> = 1
> > >
> > > ....
> >
> > Ok this one seems better than vundle and save me 100ms at startup but I dig.
> > https://github.com/junegunn/vim-plug
> >
> > Thank you Marc !
>
> Ok I save 100ms using the plugin manager vim-plug but not enough for me.
> Is anyone can advise me or explain to me why some files are loaded twice and take twice or more times N msec:
> - vim80/menu.vim
> - vim80\filetype.vim
> 096.000 047.000 044.000: sourcing D:\Logiciels\Vim\vim80/menu.vim
> 096.000 072.000 025.000: sourcing D:\Logiciels\Vim\vim80\filetype.vim
menu.vim uses `globpath()` to search some kind of files under the runtimepath.
If you search `globpath` in menu.vim, you may find the following lines:
let s:n = globpath(&runtimepath, "colors/*.vim")
let s:n = globpath(&runtimepath, "keymap/*.vim")
let s = globpath(&rtp, "spell/*." . enc . ".spl")
let s:n = globpath(&runtimepath, "compiler/*.vim")
Color schemes, keymaps, spell files and compiler plugins are searched when
menu.vim is loaded.
This is why it takes long time to be loaded.
Unlike those items, file types are not listed automatically. If a user
selects "Syntax" -> "Show File Types in Menu", they will be listed.
If we use a similar way for color schemes etc., the startup time would be
reduced.
Regards,
Ken Takata
--
--
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.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment