mirror of
https://github.com/junegunn/vim-plug.git
synced 2026-12-02 21:00:56 +00:00
Skip unnecessary loading of Python and Ruby DLLs
Vim with python/dyn, python3/dyn, or ruby/dyn doesn't load the
interpreter core DLL until the first command is issued to that
interpreter. Running has('python'), has('python3'), or has('ruby')
pulls the respective interpreter core DLL. This is described in
`:h has-python` for Python. For Ruby it isn't mentioned in docs,
but confirmed directly.
With Neovim or modern Vim with jobs, vim-plug doesn't need to use either
Python or Ruby, so avoid pulling their core DLLs by placing the has()
checks later in their conditions. This avoids pulling those DLLs at all.
This commit is contained in:
1 parent
7e5aae5e11
commit
b0d74e1522
1 file changed
+3
-3
@@ -1196,8 +1196,8 @@ function! s:update_impl(pull, force, args) abort
|
||||
endif
|
||||
|
||||
let use_job = s:nvim || s:vim8
|
||||
let python = (has('python') || has('python3')) && !use_job
|
||||
let ruby = has('ruby') && !use_job && (v:version >= 703 || v:version == 702 && has('patch374')) && !(s:is_win && has('gui_running')) && threads > 1 && s:check_ruby()
|
||||
let python = !use_job && (has('python') || has('python3'))
|
||||
let ruby = !use_job && (v:version >= 703 || v:version == 702 && has('patch374')) && !(s:is_win && has('gui_running')) && threads > 1 && has('ruby') && s:check_ruby()
|
||||
|
||||
let s:update = {
|
||||
\ 'start': reltime(),
|
||||
@@ -1233,7 +1233,7 @@ function! s:update_impl(pull, force, args) abort
|
||||
let s:submodule_opt = s:git_version_requirement(2, 8) ? ' --jobs='.threads : ''
|
||||
|
||||
" Python version requirement (>= 2.7)
|
||||
if python && !has('python3') && !ruby && !use_job && s:update.threads > 1
|
||||
if python && !ruby && !use_job && s:update.threads > 1 && !has('python3')
|
||||
redir => pyv
|
||||
silent python import platform; print platform.python_version()
|
||||
redir END
|
||||
|
||||
Reference in new issue
Block a user