Quantcast
Channel: Vimタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 5608

dein.vimの闇の力を利用し、起動時間を100ms近く縮めた話

$
0
0

どうも。
NeovimにFloating Windowが入って、色々浮かせたい今日このごろです。

私、Vimプラグインを100個以上入れているのですが、
プラグインを追加する場合は、明確な理由なく、
「あ、これPythonでしか使わんから、遅延ロード!」
「あ、これとりあえず、通常ロードで〜」
ってな感じでした。

ふと、闇の力の一部である、遅延ロードをちゃんと利用したらどれだけ起動時間が、早くなるのか気になりました。

闇の呪文「チエン」を使って起動時間を高速化してみます!

実行環境(2019/04/10現在)

とりあえず、環境ぺたっと!

PC

  • PC: MacBook Pro (Retina, 13-inch, Early 2015)
  • CPU: 3.1GHz Intel Core i7
  • MEM: 16GB 1867 MHz DDR3

Neovim バージョン

  • NVIM v0.4.0-569-g9daa7d997

利用ベンチマーク

https://github.com/rhysd/vim-startuptime
deinによるキャッシュ済みの状態でベンチマーク実行

「チエン」実行前と実行後の差分

https://github.com/deresmos/deres.vimrc/commit/05917625f1271a0aba28f995a0fb15e9a55fad26
※コードが、かおすちゃん状態(あばばばばば〜〜)なので整理したいです。

闇の力、解放前

チエンってないプラグイン数:80個
チエンってるプラグイン数:43個
合計:123個

自分ってかなりプラグイン入れてるんですね。(整理したい)

測定!

vim-startuptime -count 30 -vimpath nvim hello > before_nvim.txt

平均268msぐらいなんですね。速い人は、100ms切ってるんですかね。
てか、100個以上プラグイン入れれててこの速度はやゔぁいな。

Total Average: 268.954200 msec
Total Max:     284.020000 msec
Total Min:     256.206000 msec

結果詳細はここ!

init.vimとかが遅いので、ここらへんのスクリプト調整すると速くなりそうですね。(また、別の機会に・・・)
before_nvim.txt
Extra options: [hello]
Measured: 30 times

Total Average: 268.954200 msec
Total Max:     284.020000 msec
Total Min:     256.206000 msec

  AVERAGE       MAX       MIN
------------------------------
82.154533 99.299000 77.530000: /homedayo/.config/nvim/init.vim
38.760700 52.059000 36.490000: /homedayo/.cache/nvim-dein/state_nvim.vim
29.074566 33.740000 27.129000: loading plugins
21.876766 25.742000 21.054000: reading ShaDa
20.939500 23.848000 19.949000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/gina/component/repo.vim
18.075700 28.682000 16.545000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/NERD_tree.vim
12.399450 31.554000  5.989000: /usr/local/share/nvim/runtime/filetype.vim
12.327966 13.522000 11.885000: opening buffers
11.175000 14.398000 10.477000: /homedayo/.vim/conf.d/basic.vim
 9.483566 10.661000  9.122000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/smartinput.vim
 7.233933 11.057000  6.753000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/gina/core/buffer.vim
 6.525566 16.588000  5.590000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/ftdetect/ftdetect.vim
 5.300666  6.582000  5.130000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/EasyMotion.vim
 4.632266  4.860000  4.518000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/NERD_commenter.vim
 4.200033  6.782000  3.855000: /homedayo/.cache/nvim-dein/repos/github.com/sheerun/vim-polyglot/ftdetect/polyglot.vim
 3.422800  4.215000  3.199000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/colors/hybrid.vim
 3.105033  3.654000  3.030000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/gina/core.vim
 3.090633  5.483000  2.747000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/textobj/indent.vim
 2.798166  7.416000  2.544000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/textobj/between.vim
 2.696266  3.234000  2.544000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/gitgutter.vim
 2.603033 10.734000  2.055000: /usr/local/share/nvim/runtime/plugin/rplugin.vim
 2.445600  3.728000  2.323000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/textmanip.vim
 2.361666  2.797000  2.217000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/qfixmemo.vim
 2.322300  2.626000  2.218000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/textobj/parameter.vim
 2.163500  3.464000  1.652000: locale set
 2.056166 10.061000  1.590000: /homedayo/.local/share/nvim/rplugin.vim
 1.942566  3.344000  1.840000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/myqfix.vim
 1.802966  4.542000  1.608000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/yankround.vim
 1.697266  3.166000  1.549000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/textobj/entire.vim
 1.631333  2.189000  1.337000: /usr/local/share/nvim/runtime/ftoff.vim
 1.627833  9.993000  1.224000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/lightline/colorscheme/wombat.vim
 1.539233  2.775000  1.457000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/qfixwin.vim
 1.523733  1.942000  1.404000: BufEnter autocommands
 1.508333  1.916000  1.316000: /homedayo/.cache/nvim-dein/repos/github.com/w0rp/ale/plugin/ale.vim
 1.429733  1.816000  1.361000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/magit.vim
 1.317233  1.636000  1.249000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/abolish.vim
 1.291433  1.403000  1.245000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/mygrep.vim
 1.277433  2.118000  1.208000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/asyncrun.vim
 1.257333  2.730000  1.031000: sourcing vimrc file(s)
 1.201666  2.087000  1.135000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/env-cnv.vim
 1.199166  2.416000  0.992000: /usr/local/share/nvim/runtime/syntax/syntax.vim
 1.196600  2.747000  1.037000: /usr/local/share/nvim/runtime/plugin/netrwPlugin.vim
 1.188900  1.772000  1.078000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/vCoolor.vim
 1.133666  1.195000  1.094000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/indent_guides.vim
 1.093900  1.950000  1.031000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/gina.vim
 1.077200  1.933000  0.983000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/bookmark.vim
 0.972433  1.751000  0.899000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/nerdtree/ui_glue.vim
 0.929866  1.060000  0.875000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/l9.vim
 0.921266  1.089000  0.848000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/operator/camelize.vim
 0.863266  1.384000  0.760000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/diffchar.vim
 0.840000  0.982000  0.807000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/nerdtree_plugin/fs_menu.vim
 0.837466  0.912000  0.811000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/qfixgrep.vim
 0.808633  0.905000  0.751000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/quickhl.vim
 0.770500  1.495000  0.648000: /usr/local/share/nvim/runtime/syntax/synload.vim
 0.743666  0.816000  0.718000: /homedayo/.cache/nvim-dein/repos/github.com/Chiel92/vim-autoformat/plugin/defaults.vim
 0.695033  1.682000  0.626000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/xterm-color-table.vim
 0.668500  0.803000  0.642000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/dirdiff.vim
 0.657700  0.724000  0.602000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/searchindex.vim
 0.654600  0.685000  0.627000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/matchit.vim
 0.603566  0.896000  0.572000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/textobj/user.vim
 0.544466  0.730000  0.323000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/highlightedyank.vim
 0.540766  1.185000  0.481000: inits 1
 0.533866  0.572000  0.522000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/lib/nerdtree/path.vim
 0.526000  1.270000  0.449000: loading after plugins
 0.518166  0.539000  0.507000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina/Data/List.vim
 0.514766  0.936000  0.392000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/fugitive.vim
 0.507266  0.683000  0.404000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/conflict_marker.vim
 0.506566  1.016000  0.470000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/lightline.vim
 0.499633  0.588000  0.484000: /homedayo/.cache/nvim-dein/repos/github.com/Shougo/dein.vim/autoload/dein/util.vim
 0.484233  1.020000  0.420000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/lib/nerdtree/ui.vim
 0.479700  0.570000  0.466000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina/Data/String.vim
 0.475433  0.743000  0.365000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/openbrowser.vim
 0.474500  0.740000  0.441000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/lib/nerdtree/tree_dir_node.vim
 0.467266  0.898000  0.437000: init highlight
 0.444733  0.642000  0.385000: /usr/local/share/nvim/runtime/plugin/gzip.vim
 0.440466  0.863000  0.322000: /usr/local/share/nvim/runtime/plugin/zipPlugin.vim
 0.440200  0.480000  0.430000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/switch.vim
 0.405166  0.683000  0.358000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/agit.vim
 0.402866  0.485000  0.387000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/SudoEdit.vim
 0.396566  0.698000  0.372000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/gina.vim
 0.384233  0.500000  0.272000: /usr/local/share/nvim/runtime/plugin/tarPlugin.vim
 0.380833  0.465000  0.370000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/l9.vim
 0.376300  0.448000  0.360000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/leaderGuide.vim
 0.376266  0.784000  0.345000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/undotree.vim
 0.375666  0.395000  0.363000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/incsearch.vim
 0.367966  0.690000  0.336000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina/System/Filepath.vim
 0.366766  0.438000  0.352000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/submode.vim
 0.352066  0.425000  0.302000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/zenspace.vim
 0.351600  0.473000  0.316000: /usr/local/share/nvim/runtime/plugin/shada.vim
 0.346866  0.744000  0.305000: expanding arguments
 0.342566  0.352000  0.330000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/operator/surround.vim
 0.342166  0.382000  0.328000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina/Prelude.vim
 0.305300  0.441000  0.208000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/committia.vim
 0.302566  0.414000  0.241000: /homedayo/.vim/conf.d/filetype.vim
 0.298966  0.447000  0.262000: /usr/local/share/nvim/runtime/plugin/man.vim
 0.297533  0.374000  0.277000: /homedayo/.cache/nvim-dein/repos/github.com/Shougo/dein.vim/autoload/dein/autoload.vim
 0.288633  0.932000  0.258000: /usr/local/share/nvim/runtime/plugin/matchparen.vim
 0.287233  0.328000  0.188000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/cursorword.vim
 0.283066  0.333000  0.247000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/lightline.vim
 0.281800  0.516000  0.257000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/lib/nerdtree/creator.vim
 0.281200  0.645000  0.255000: parsing arguments
 0.271733  0.599000  0.238000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/lightline/colorscheme.vim
 0.261866  0.417000  0.246000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/lib/nerdtree/bookmark.vim
 0.257500  0.482000  0.235000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina/Vim/Guard.vim
 0.256300  0.301000  0.237000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/incsearch/fuzzy.vim
 0.254166  0.334000  0.238000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/operator/html_escape.vim
 0.254000  0.455000  0.227000: /usr/local/share/nvim/runtime/autoload/remote/host.vim
 0.253233  0.363000  0.239000: /homedayo/.cache/nvim-dein/repos/github.com/Chiel92/vim-autoformat/plugin/autoformat.vim
 0.253200  0.276000  0.248000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/gitgutter/hunk.vim
 0.246700  0.591000  0.213000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/foldCC.vim
 0.246500  0.381000  0.227000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/easy_align.vim
 0.244433  0.452000  0.215000: /usr/local/share/nvim/runtime/autoload/remote/define.vim
 0.242200  0.444000  0.224000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vcoolor/convert.vim
 0.239900  0.265000  0.228000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/lib/nerdtree/tree_file_node.vim
 0.239166  0.371000  0.225000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/lib/nerdtree/opener.vim
 0.233933  0.298000  0.221000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina/Vim/BufferManager.vim
 0.231333  0.357000  0.212000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina/Vim/Buffer.vim
 0.230766  0.423000  0.197000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/renamer.vim
 0.222200  0.269000  0.197000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/nerdtree_plugin/dirdiff_node.vim
 0.220466  0.629000  0.188000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina/Data/Dict.vim
 0.218033  1.071000  0.159000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/visual-star-search.vim
 0.214766  0.537000  0.188000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/nerdtree_plugin/yp_node.vim
 0.213733  0.264000  0.193000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/leaderGuide.vim
 0.210891  0.419000  0.178000: /usr/local/share/nvim/runtime/syntax/syncolor.vim
 0.210233  0.368000  0.189000: /homedayo/.cache/nvim-dein/repos/github.com/chrisbra/colorizer/plugin/ColorizerPlugin.vim
 0.203600  0.243000  0.185000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/startify.vim
 0.199700  0.217000  0.194000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/indent_guides.vim
 0.195900  0.222000  0.187000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/gitgutter/utility.vim
 0.192166  0.299000  0.154000: /homedayo/.vim/conf.d/color.vim
 0.188233  0.230000  0.172000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/operator/user.vim
 0.184100  0.199000  0.174000: /homedayo/.cache/nvim-dein/repos/github.com/Shougo/dein.vim/autoload/dein.vim
 0.174300  0.365000  0.160000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/../common/magit_common.vim
 0.174000  0.439000  0.155000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/lib/nerdtree/nerdtree.vim
 0.170300  0.242000  0.159000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/migemo.vim
 0.168366  0.217000  0.159000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/incsearch/migemo.vim
 0.163633  0.253000  0.151000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/nerdtree.vim
 0.162800  0.421000  0.140000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina/Vim/Type.vim
 0.158100  0.171000  0.150000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/lib/nerdtree/menu_controller.vim
 0.155533  0.273000  0.143000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina/Vim/Buffer/Opener.vim
 0.153200  0.162000  0.140000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/operator/replace.vim
 0.151100  0.210000  0.141000: /homedayo/.cache/nvim-dein/repos/github.com/thinca/vim-quickrun/plugin/quickrun.vim
 0.150433  0.213000  0.141000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina/Vim/Window.vim
 0.148333  0.158000  0.137000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/__gina__/Git.vim
 0.145200  0.237000  0.136000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina/Text/INI.vim
 0.145100  0.157000  0.139000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/gitgutter/highlight.vim
 0.144100  0.175000  0.138000: /usr/local/share/nvim/runtime/plugin/tohtml.vim
 0.141766  0.184000  0.135000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/gitgutter.vim
 0.141333  0.171000  0.129000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/nerdtree_plugin/exec_menuitem.vim
 0.141000  0.370000  0.124000: loading packages
 0.138766  0.179000  0.134000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina/System/Cache/Memory.vim
 0.135933  0.161000  0.132000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina/Config.vim
 0.135300  0.148000  0.128000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/lib/nerdtree/key_map.vim
 0.133900  0.146000  0.130000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina/System/Cache/Base.vim
 0.132066  0.204000  0.123000: /homedayo/.cache/nvim-dein/repos/github.com/w0rp/ale/autoload/ale/events.vim
 0.127966  0.175000  0.112000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/nerdtree_plugin/diff_node.vim
 0.123633  0.220000  0.097000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/lib/nerdtree/notifier.vim
 0.117066  0.126000  0.108000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/linediff.vim
 0.112333  0.373000  0.089000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/bufonly.vim
 0.112000  0.195000  0.098000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/spatab.vim
 0.101266  0.106000  0.093000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/lib/nerdtree/menu_item.vim
 0.101200  0.179000  0.093000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/__gina__/System/Store.vim
 0.094533  0.233000  0.073000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/nerdtree_plugin/vcs.vim
 0.092600  0.109000  0.089000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/spatab.vim
 0.090566  0.128000  0.083000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/cursorword.vim
 0.084666  0.145000  0.076000: inits 2
 0.081666  0.087000  0.077000: /homedayo/.cache/nvim-dein/repos/github.com/Shougo/vimproc.vim/plugin/vimproc.vim
 0.079800  0.153000  0.049000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/lib/nerdtree/event.vim
 0.078466  0.176000  0.065000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/lib/nerdtree/flag_set.vim
 0.077133  0.090000  0.073000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/qfreplace.vim
 0.075566  0.081000  0.073000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/smartinput.vim
 0.074100  0.083000  0.068000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/lightline/tab.vim
 0.069900  0.139000  0.054000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/gist.vim
 0.069166  0.095000  0.065000: /usr/local/share/nvim/runtime/plugin/spellfile.vim
 0.065633  0.124000  0.055000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/colorswatch.vim
 0.064600  0.124000  0.060000: /usr/local/share/nvim/runtime/plugin/tutor.vim
 0.061933  0.080000  0.056000: /usr/local/share/nvim/runtime/indent.vim
 0.061733  0.074000  0.052000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/merginal.vim
 0.060466  0.074000  0.054000: /homedayo/.cache/nvim-dein/repos/github.com/deresmos/nvim-term/plugin/nvimterm.vim
 0.058433  0.102000  0.050000: /homedayo/.cache/nvim-dein/repos/github.com/deresmos/vim-snippets/plugin/vimsnippets.vim
 0.056000  0.190000  0.044000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/gina.vim
 0.053533  0.095000  0.049000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/vital/_gina.vim
 0.050733  0.067000  0.048000: /usr/local/share/nvim/runtime/plugin/matchit.vim
 0.048666  0.080000  0.040000: /homedayo/.cache/nvim-dein/repos/github.com/sheerun/vim-polyglot/after/ftdetect/rspec.vim
 0.048016  0.111000  0.025000: /usr/local/share/nvim/runtime/ftplugin.vim
 0.046233  0.079000  0.039000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/after/plugin/yankround.vim
 0.045000  0.090000  0.038000: /homedayo/.cache/nvim-dein/repos/github.com/Chiel92/vim-autoformat/plugin/utils.vim
 0.042666  0.049000  0.038000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/qfixmru.vim
 0.040466  0.053000  0.037000: /usr/local/share/nvim/runtime/plugin/rrhelper.vim
 0.039133  0.092000  0.033000: /usr/local/share/nvim/runtime/plugin/gui_shim.vim
 0.037233  0.064000  0.034000: clearing screen
 0.036066  0.054000  0.033000: /usr/local/share/nvim/runtime/plugin/health.vim
 0.035866  0.068000  0.028000: /homedayo/.vim/conf.d/custom.vim
 0.031500  0.045000  0.027000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/ftplugin.vim
 0.029000  0.046000  0.027000: window checked
 0.011200  0.031000  0.009000: --- NVIM STARTING ---
 0.008400  0.009000  0.007000: editing files in windows
 0.008000  0.013000  0.007000: inits 3


闇の力、解放後

チエンってないプラグイン数:80 -> 41個 (39個チエン化)
チエンってるプラグイン数 43 ->:81個 (ん?プラグイン1個減ってね?)
合計:122個 (やっぱり減ってるなー。確認しときますw)

測定!

vim-startuptime -count 30 -vimpath nvim hello > after_nvim.txt

おぉ!100ms台となりました!
平均で、35%程削減となりました!

Total Average: 268.954200 msec -> 176.510666 msec (92)
Total Max:     284.020000 msec -> 238.079000 msec (46)
Total Min:     256.206000 msec -> 161.490000 msec (95)

結果詳細はここ!
after_nvim.txt
Extra options: [hello]
Measured: 30 times

Total Average: 176.510666 msec
Total Max:     238.079000 msec
Total Min:     161.490000 msec

  AVERAGE       MAX       MIN
------------------------------
58.198466 82.409000 52.700000: /homedayo/.config/nvim/init.vim
22.480900 27.395000 21.428000: reading ShaDa
19.270533 29.576000 16.907000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/plugin/NERD_tree.vim
16.999200 25.917000 14.118000: loading plugins
15.188266 25.140000 13.011000: /homedayo/.cache/nvim-dein/state_nvim.vim
11.997283 24.670000  6.020000: /usr/local/share/nvim/runtime/filetype.vim
11.040100 16.260000  9.890000: opening buffers
11.030933 14.041000 10.233000: /homedayo/.vim/conf.d/basic.vim
 5.977600  8.802000  5.354000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/ftdetect/ftdetect.vim
 4.755833  6.735000  4.365000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/NERD_commenter.vim
 4.205900  6.421000  3.662000: /homedayo/.cache/nvim-dein/repos/github.com/sheerun/vim-polyglot/ftdetect/polyglot.vim
 3.602233  6.045000  3.175000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/colors/hybrid.vim
 2.848233  4.183000  2.621000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/textobj/indent.vim
 2.800366  5.009000  2.385000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/textobj/between.vim
 2.763566  5.064000  2.492000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/gitgutter.vim
 2.366366  4.424000  2.101000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/textobj/parameter.vim
 2.227766  3.851000  1.870000: /usr/local/share/nvim/runtime/plugin/rplugin.vim
 2.077500  3.122000  1.884000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/textmanip.vim
 1.951333  2.585000  1.526000: locale set
 1.830966  4.338000  1.265000: /usr/local/share/nvim/runtime/ftoff.vim
 1.729566  3.220000  1.409000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/ale.vim
 1.676200  3.025000  1.443000: /homedayo/.local/share/nvim/rplugin.vim
 1.602866  2.353000  1.439000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/textobj/entire.vim
 1.481233  2.378000  1.156000: BufEnter autocommands
 1.432100  3.932000  1.129000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/lightline/colorscheme/wombat.vim
 1.176100  2.324000  0.999000: sourcing vimrc file(s)
 1.137833  1.353000  0.925000: /usr/local/share/nvim/runtime/syntax/syntax.vim
 1.041900  2.115000  0.696000: /usr/local/share/nvim/runtime/plugin/netrwPlugin.vim
 1.031900  1.540000  0.968000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/lib/nerdtree/path.vim
 0.966833  1.620000  0.869000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/l9.vim
 0.923333  1.532000  0.775000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/operator/camelize.vim
 0.794100  1.340000  0.676000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/diffchar.vim
 0.735800  0.845000  0.620000: /usr/local/share/nvim/runtime/syntax/synload.vim
 0.693366  1.179000  0.649000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/nerdtree_plugin/fs_menu.vim
 0.652066  1.123000  0.600000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/matchit.vim
 0.645500  1.067000  0.609000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/neomru.vim
 0.639500  1.378000  0.528000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/textobj/user.vim
 0.591300  0.665000  0.561000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/lib/nerdtree/tree_dir_node.vim
 0.577866  0.941000  0.479000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/searchindex.vim
 0.572100  0.717000  0.542000: /homedayo/.cache/nvim-dein/repos/github.com/Shougo/dein.vim/autoload/dein/util.vim
 0.561200  0.935000  0.520000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/lib/nerdtree/bookmark.vim
 0.538466  0.789000  0.498000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/lib/nerdtree/tree_file_node.vim
 0.528733  1.611000  0.458000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/lightline.vim
 0.511033  1.086000  0.474000: inits 1
 0.491733  0.801000  0.297000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/highlightedyank.vim
 0.461000  0.751000  0.391000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/fugitive.vim
 0.452466  0.696000  0.435000: init highlight
 0.444966  0.639000  0.407000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/autoload/nerdtree/ui_glue.vim
 0.444433  0.656000  0.367000: /usr/local/share/nvim/runtime/plugin/gzip.vim
 0.406133  0.949000  0.257000: /usr/local/share/nvim/runtime/plugin/tarPlugin.vim
 0.395833  0.683000  0.274000: /usr/local/share/nvim/runtime/plugin/zipPlugin.vim
 0.395600  0.668000  0.357000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/l9.vim
 0.380700  0.617000  0.349000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/submode.vim
 0.350100  0.699000  0.275000: /usr/local/share/nvim/runtime/plugin/shada.vim
 0.340200  0.562000  0.253000: /homedayo/.vim/conf.d/filetype.vim
 0.337066  0.367000  0.321000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/lib/nerdtree/ui.vim
 0.336333  0.491000  0.288000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/lib/nerdtree/menu_controller.vim
 0.329266  0.581000  0.275000: expanding arguments
 0.313066  0.517000  0.276000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/operator/surround.vim
 0.293000  0.529000  0.154000: /usr/local/share/nvim/runtime/plugin/man.vim
 0.286433  0.526000  0.170000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/cursorword.vim
 0.279800  0.500000  0.197000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/neomru.vim
 0.279400  0.602000  0.195000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/committia.vim
 0.273400  0.429000  0.245000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/gitgutter/hunk.vim
 0.273066  0.554000  0.238000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/lib/nerdtree/key_map.vim
 0.272466  0.496000  0.257000: parsing arguments
 0.271366  0.367000  0.254000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/lib/nerdtree/creator.vim
 0.270000  0.974000  0.213000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/lightline/colorscheme.vim
 0.269400  0.506000  0.187000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/lightline.vim
 0.259200  0.391000  0.234000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/foldCC.vim
 0.256666  0.638000  0.233000: /homedayo/.cache/nvim-dein/repos/github.com/Shougo/dein.vim/autoload/dein/autoload.vim
 0.251866  0.459000  0.148000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/neoyank.vim
 0.247500  0.461000  0.207000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/operator/html_escape.vim
 0.236833  0.323000  0.216000: /usr/local/share/nvim/runtime/autoload/remote/host.vim
 0.236600  0.258000  0.225000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/lib/nerdtree/opener.vim
 0.235566  0.573000  0.207000: /usr/local/share/nvim/runtime/autoload/remote/define.vim
 0.227366  0.392000  0.162000: /homedayo/.vim/conf.d/color.vim
 0.220566  0.292000  0.199000: /usr/local/share/nvim/runtime/plugin/matchparen.vim
 0.219666  0.333000  0.192000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/lib/nerdtree/menu_item.vim
 0.213050  0.352000  0.174000: /usr/local/share/nvim/runtime/syntax/syncolor.vim
 0.198266  0.390000  0.175000: /homedayo/.cache/nvim-dein/repos/github.com/Shougo/dein.vim/autoload/dein.vim
 0.194433  0.317000  0.178000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/gitgutter/utility.vim
 0.191900  0.391000  0.161000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/operator/user.vim
 0.187033  0.458000  0.158000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/autoload/nerdtree.vim
 0.180466  0.283000  0.163000: /homedayo/.cache/nvim-dein/repos/github.com/deresmos/nerdtree-dirdiff-plugin/nerdtree_plugin/dirdiff_node.vim
 0.178833  0.252000  0.165000: /homedayo/.cache/nvim-dein/repos/github.com/deresmos/nerdtree-yp-plugin/nerdtree_plugin/yp_node.vim
 0.168366  0.253000  0.154000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/lib/nerdtree/nerdtree.vim
 0.160900  0.239000  0.134000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/startify.vim
 0.160466  0.297000  0.138000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/quickrun.vim
 0.150433  0.244000  0.133000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/gitgutter/highlight.vim
 0.150333  0.252000  0.132000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/gitgutter.vim
 0.149333  0.250000  0.122000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/operator/replace.vim
 0.142233  0.283000  0.118000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/visual-star-search.vim
 0.142133  0.250000  0.121000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/ale/events.vim
 0.136000  0.229000  0.122000: loading packages
 0.130566  0.211000  0.115000: /usr/local/share/nvim/runtime/plugin/tohtml.vim
 0.123000  0.136000  0.110000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/nerdtree_plugin/exec_menuitem.vim
 0.115800  0.186000  0.101000: /homedayo/.cache/nvim-dein/repos/github.com/deresmos/nerdtree-diff-plugin/nerdtree_plugin/diff_node.vim
 0.115500  0.223000  0.101000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/spatab.vim
 0.095933  0.154000  0.079000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/cursorword.vim
 0.093533  0.169000  0.082000: /homedayo/.cache/nvim-dein/repos/github.com/Shougo/vimproc.vim/plugin/vimproc.vim
 0.092600  0.150000  0.083000: loading after plugins
 0.080700  0.093000  0.075000: inits 2
 0.077333  0.145000  0.069000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/autoload/lightline/tab.vim
 0.076266  0.096000  0.067000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/lib/nerdtree/flag_set.vim
 0.075166  0.140000  0.061000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/nvimterm.vim
 0.072233  0.179000  0.058000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/spatab.vim
 0.071666  0.119000  0.062000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/lib/nerdtree/notifier.vim
 0.070233  0.216000  0.056000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/nerdtree_plugin/vcs.vim
 0.066166  0.106000  0.055000: /usr/local/share/nvim/runtime/indent.vim
 0.058633  0.150000  0.043000: /usr/local/share/nvim/runtime/plugin/spellfile.vim
 0.058433  0.111000  0.046000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/plugin/vimsnippets.vim
 0.050966  0.118000  0.042000: /usr/local/share/nvim/runtime/plugin/matchit.vim
 0.050400  0.087000  0.026000: /usr/local/share/nvim/runtime/ftplugin.vim
 0.048000  0.077000  0.040000: /homedayo/.cache/nvim-dein/repos/github.com/sheerun/vim-polyglot/after/ftdetect/rspec.vim
 0.046733  0.080000  0.037000: /usr/local/share/nvim/runtime/plugin/tutor.vim
 0.044833  0.263000  0.028000: /homedayo/.vim/conf.d/custom.vim
 0.044300  0.088000  0.037000: /homedayo/.cache/nvim-dein/repos/github.com/scrooloose/nerdtree/lib/nerdtree/event.vim
 0.042300  0.090000  0.032000: /usr/local/share/nvim/runtime/plugin/rrhelper.vim
 0.035033  0.076000  0.031000: /usr/local/share/nvim/runtime/plugin/gui_shim.vim
 0.033566  0.063000  0.029000: /usr/local/share/nvim/runtime/plugin/health.vim
 0.030800  0.064000  0.025000: /homedayo/.cache/nvim-dein/.cache/init.vim/.dein/ftplugin.vim
 0.028800  0.054000  0.027000: window checked
 0.018800  0.032000  0.016000: clearing screen
 0.010600  0.022000  0.009000: --- NVIM STARTING ---
 0.008633  0.013000  0.008000: editing files in windows
 0.007533  0.013000  0.007000: inits 3


比較Gif

Enter押した時間からの、比較をしてみました。(左Before、右After)
ちゃんと速くなってる!!
before_after.gif

まとめ

遅延ロードを設定することで、100ms近く(35%の削減)ができました!
まだまだ、チューニングしがいがありそうなので、さらに高速化を目指してみます!
みなさんの高速化ナレッジあれば、何卒ご教授よろしくお願いいたします!


Viewing all articles
Browse latest Browse all 5608

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>