Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit634c47b

Browse files
philiplinelljustinmk
authored andcommitted
feat(checkhealth): check for slow shellneovim#17829
Problem:I had some issues where multiple plugins (vim-fzf and fugitive) was slowbecause of my `.zshenv`.Solution:Check shell performance in :checkhealth.Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
1 parent2d06831 commit634c47b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎runtime/autoload/health/nvim.vim‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,16 @@ function! s:check_performance() abort
144144
\['Install a different Nvim package, or rebuild with `CMAKE_BUILD_TYPE=RelWithDebInfo`.',
145145
\s:suggest_faq])
146146
endif
147+
148+
" check for slow shell invocation
149+
let slow_cmd_time=1.5
150+
let start_time=reltime()
151+
callsystem('echo')
152+
let elapsed_time=reltimefloat(reltime(start_time))
153+
if elapsed_time >slow_cmd_time
154+
callhealth#report_warn(
155+
\'Slow shell invocation (took'.printf('%.2f', elapsed_time).' seconds).')
156+
endif
147157
endfunction
148158

149159
function!s:get_tmux_option(option)abort

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp