Skip to content

vim-plug does unnecessary loading of Python and Ruby DLLs - #1344

Merged
junegunn merged 4 commits into
junegunn:masterfrom
Coacher:drop-uncesseary-loading
Nov 7, 2026
Merged

junegunn merged 4 commits into
junegunn:masterfrom
Coacher:drop-uncesseary-loading

Conversation

@Coacher

@Coacher Coacher commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Even though vim-plug uses jobs on neovim/vim with jobs, vim-plug still loads Python and Ruby core DLLs in dynamic builds due to incorrect has() checks placement. I have fixed those checks.

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.
`python` variable already checks for `!use_job`.
When falling back to Python, check for Python 3 presence first.
This avoids pulling Python 2 at all when Python 3 is available.
- Match the order of the has() checks in s:update_impl
- Avoid loading the Python 2 library after Python 3
@junegunn
junegunn merged commit 4c4e56b into junegunn:master Nov 7, 2026
1 check passed
@junegunn

junegunn commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Merged, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants