nickjj / dotfiles

Settings for various tools I use.
https://nickjanetakis.com/blog/the-tools-i-use
MIT License
953 stars 183 forks source link

vim starts up very slow nearly 30 seconds #4

Closed raptoravis closed 4 years ago

raptoravis commented 4 years ago

vim starts up very slow nearly 30 seconds.

OS: win10 2004 image

image

and the following is the log with vim --startuptime


times in msec
 clock   self+sourced   self:  sourced script
 clock   elapsed:              other lines

000.251  000.251: --- VIM STARTING ---
000.306  000.055: Allocated generic buffers
000.396  000.090: locale set
000.401  000.005: GUI prepared
000.405  000.004: clipboard setup
000.407  000.002: window checked
000.586  000.179: inits 1
000.599  000.013: parsing arguments
000.599  000.000: expanding arguments
000.613  000.014: shell init
000.809  000.196: Termcap init
000.849  000.040: inits 2
000.943  000.094: init highlight
002.145  000.125  000.125: sourcing /usr/share/vim/vim81/debian.vim
004.116  000.513  000.513: sourcing /usr/share/vim/vim81/syntax/syncolor.vim
004.218  001.277  000.764: sourcing /usr/share/vim/vim81/syntax/synload.vim
008.186  003.635  003.635: sourcing /usr/share/vim/vim81/filetype.vim
008.211  005.641  000.729: sourcing /usr/share/vim/vim81/syntax/syntax.vim
008.225  006.683  000.917: sourcing $VIM/vimrc
010.183  000.932  000.932: sourcing /home/xxxxx/.vim/autoload/plug.vim
014.485  000.253  000.253: sourcing /usr/share/vim/vim81/ftoff.vim
022.043  000.014  000.014: sourcing /home/xxxxx/.vim/plugged/vim-fugitive/ftdetect/fugitive.vim
022.823  000.019  000.019: sourcing /home/xxxxx/.vim/plugged/ultisnips/ftdetect/snippets.vim
023.475  000.014  000.014: sourcing /home/xxxxx/.vim/plugged/scss-syntax.vim/ftdetect/scss.vim
024.110  000.036  000.036: sourcing /home/xxxxx/.vim/plugged/nginx.vim/ftdetect/nginx.vim
024.744  000.018  000.018: sourcing /home/xxxxx/.vim/plugged/csv.vim/ftdetect/csv.vim
025.367  000.031  000.031: sourcing /home/xxxxx/.vim/plugged/dockerfile.vim/ftdetect/Dockerfile.vim
025.930  000.026  000.026: sourcing /home/xxxxx/.vim/plugged/dockerfile.vim/ftdetect/docker-compose.vim
026.538  000.030  000.030: sourcing /home/xxxxx/.vim/plugged/vim-elixir/ftdetect/elixir.vim
027.135  000.036  000.036: sourcing /home/xxxxx/.vim/plugged/Vim-Jinja2-Syntax/ftdetect/jinja.vim
027.766  000.023  000.023: sourcing /home/xxxxx/.vim/plugged/vim-markdown/ftdetect/markdown.vim
028.398  000.023  000.023: sourcing /home/xxxxx/.vim/plugged/vim-hcl/ftdetect/hcl.vim
028.849  000.012  000.012: sourcing /home/xxxxx/.vim/plugged/pgsql.vim/ftdetect/pgsql.vim
029.241  000.011  000.011: sourcing /home/xxxxx/.vim/plugged/vim-javascript/ftdetect/flow.vim
029.551  000.026  000.026: sourcing /home/xxxxx/.vim/plugged/vim-javascript/ftdetect/javascript.vim
029.937  000.086  000.086: sourcing /home/xxxxx/.vim/plugged/i3-vim-syntax/ftdetect/i3.vim
030.267  000.013  000.013: sourcing /home/xxxxx/.vim/plugged/vim-tmux/ftdetect/tmux.vim
030.624  000.059  000.059: sourcing /home/xxxxx/.vim/plugged/vim-git/ftdetect/git.vim
031.153  000.054  000.054: sourcing /home/xxxxx/.vim/plugged/vim-liquid/ftdetect/liquid.vim
031.667  000.067  000.067: sourcing /home/xxxxx/.vim/plugged/vim-ruby/ftdetect/ruby.vim
032.127  000.093  000.093: sourcing /home/xxxxx/.vim/plugged/vim-ruby/ftdetect/ruby_extra.vim
032.481  000.034  000.034: sourcing /home/xxxxx/.vim/plugged/vim-systemd-syntax/ftdetect/systemd.vim
032.583  014.931  014.206: sourcing /usr/share/vim/vim81/filetype.vim
033.089  000.029  000.029: sourcing /usr/share/vim/vim81/ftplugin.vim
033.588  000.027  000.027: sourcing /usr/share/vim/vim81/indent.vim
034.501  000.217  000.217: sourcing /usr/share/vim/vim81/syntax/nosyntax.vim
035.561  000.112  000.112: sourcing /usr/share/vim/vim81/syntax/syncolor.vim
035.647  000.676  000.564: sourcing /usr/share/vim/vim81/syntax/synload.vim
035.665  001.683  000.790: sourcing /usr/share/vim/vim81/syntax/syntax.vim
036.890  000.109  000.109: sourcing /usr/share/vim/vim81/syntax/syncolor.vim
037.811  000.117  000.117: sourcing /usr/share/vim/vim81/syntax/syncolor.vim
045.778  009.816  009.590: sourcing /home/xxxxx/.vim/plugged/vim-one/colors/one.vim
047.833  000.174  000.174: sourcing /usr/share/vim/vim81/syntax/syncolor.vim
048.886  000.172  000.172: sourcing /usr/share/vim/vim81/syntax/syncolor.vim
059.327  012.777  012.431: sourcing /home/xxxxx/.vim/plugged/vim-one/colors/one.vim
087.524  000.266  000.266: sourcing /usr/share/vim/vim81/pack/dist/opt/matchit/plugin/matchit.vim
087.563  020.589  020.323: sourcing /usr/share/vim/vim81/macros/matchit.vim
088.187  079.457  018.420: sourcing $HOME/.vimrc
088.190  001.107: sourcing vimrc file(s)
089.222  000.544  000.544: sourcing /home/xxxxx/.fzf/plugin/fzf.vim
090.426  000.742  000.742: sourcing /home/xxxxx/.vim/plugged/fzf.vim/plugin/fzf.vim
091.283  000.126  000.126: sourcing /home/xxxxx/.vim/plugged/vim-obsession/plugin/obsession.vim
092.003  000.039  000.039: sourcing /home/xxxxx/.vim/plugged/vim-zoom/plugin/zoom.vim
092.708  000.014  000.014: sourcing /home/xxxxx/.vim/plugged/vim-tmux-focus-events/plugin/tmux_focus_events.vim
094.009  000.130  000.130: sourcing /home/xxxxx/.vim/plugged/nerdtree/autoload/nerdtree.vim
095.043  000.282  000.282: sourcing /home/xxxxx/.vim/plugged/nerdtree/lib/nerdtree/path.vim
095.436  000.075  000.075: sourcing /home/xxxxx/.vim/plugged/nerdtree/lib/nerdtree/menu_controller.vim
095.808  000.046  000.046: sourcing /home/xxxxx/.vim/plugged/nerdtree/lib/nerdtree/menu_item.vim
096.177  000.059  000.059: sourcing /home/xxxxx/.vim/plugged/nerdtree/lib/nerdtree/key_map.vim
096.619  000.122  000.122: sourcing /home/xxxxx/.vim/plugged/nerdtree/lib/nerdtree/bookmark.vim
097.049  000.116  000.116: sourcing /home/xxxxx/.vim/plugged/nerdtree/lib/nerdtree/tree_file_node.vim
097.616  000.255  000.255: sourcing /home/xxxxx/.vim/plugged/nerdtree/lib/nerdtree/tree_dir_node.vim
098.031  000.106  000.106: sourcing /home/xxxxx/.vim/plugged/nerdtree/lib/nerdtree/opener.vim
098.481  000.142  000.142: sourcing /home/xxxxx/.vim/plugged/nerdtree/lib/nerdtree/creator.vim
098.826  000.030  000.030: sourcing /home/xxxxx/.vim/plugged/nerdtree/lib/nerdtree/flag_set.vim
099.214  000.078  000.078: sourcing /home/xxxxx/.vim/plugged/nerdtree/lib/nerdtree/nerdtree.vim
099.691  000.161  000.161: sourcing /home/xxxxx/.vim/plugged/nerdtree/lib/nerdtree/ui.vim
100.015  000.016  000.016: sourcing /home/xxxxx/.vim/plugged/nerdtree/lib/nerdtree/event.vim
100.372  000.027  000.027: sourcing /home/xxxxx/.vim/plugged/nerdtree/lib/nerdtree/notifier.vim
100.944  000.256  000.256: sourcing /home/xxxxx/.vim/plugged/nerdtree/autoload/nerdtree/ui_glue.vim
102.853  000.061  000.061: sourcing /home/xxxxx/.vim/plugged/nerdtree/nerdtree_plugin/exec_menuitem.vim
133.291  030.152  030.152: sourcing /home/xxxxx/.vim/plugged/nerdtree/nerdtree_plugin/fs_menu.vim
133.641  000.044  000.044: sourcing /home/xxxxx/.vim/plugged/nerdtree/nerdtree_plugin/vcs.vim
134.085  040.856  008.698: sourcing /home/xxxxx/.vim/plugged/nerdtree/plugin/NERD_tree.vim
134.943  000.544  000.544: sourcing /home/xxxxx/.vim/plugged/vim-eunuch/plugin/eunuch.vim
135.385  000.126  000.126: sourcing /home/xxxxx/.vim/plugged/ranger.vim/plugin/ranger.vim
136.092  000.389  000.389: sourcing /home/xxxxx/.vim/plugged/vim-dirdiff/plugin/dirdiff.vim
136.519  000.104  000.104: sourcing /home/xxxxx/.vim/plugged/linediff.vim/plugin/linediff.vim
137.575  000.116  000.116: sourcing /home/xxxxx/.vim/plugged/vim-ingo-library/autoload/ingo/plugin/cmdcomplete.vim
137.781  000.832  000.716: sourcing /home/xxxxx/.vim/plugged/vim-SpellCheck/plugin/SpellCheck.vim
138.345  000.202  000.202: sourcing /home/xxxxx/.vim/plugged/vim-highlightedyank/plugin/highlightedyank.vim
139.104  000.423  000.423: sourcing /home/xxxxx/.vim/plugged/quick-scope/plugin/quick_scope.vim
139.584  000.153  000.153: sourcing /home/xxxxx/.vim/plugged/vim-visual-star-search/plugin/visual-star-search.vim
140.286  000.377  000.377: sourcing /home/xxxxx/.vim/plugged/is.vim/plugin/is.vim
141.877  001.256  001.256: sourcing /home/xxxxx/.vim/plugged/vim-grepper/plugin/grepper.vim
142.781  000.573  000.573: sourcing /home/xxxxx/.vim/plugged/vim-better-whitespace/plugin/better-whitespace.vim
143.279  000.173  000.173: sourcing /home/xxxxx/.vim/plugged/vim-commentary/plugin/commentary.vim
144.045  000.221  000.221: sourcing /home/xxxxx/.vim/plugged/vim-sleuth/plugin/sleuth.vim
150.221  005.858  005.858: sourcing /home/xxxxx/.vim/plugged/vim-unimpaired/plugin/unimpaired.vim
151.385  000.458  000.458: sourcing /home/xxxxx/.vim/plugged/FastFold/plugin/fastfold.vim
152.447  000.250  000.250: sourcing /home/xxxxx/.vim/plugged/vim-signify/plugin/signify.vim
154.709  001.512  001.512: sourcing /home/xxxxx/.vim/plugged/vim-fugitive/plugin/fugitive.vim
155.444  000.045  000.045: sourcing /home/xxxxx/.vim/plugged/limelight.vim/plugin/limelight.vim
156.053  000.030  000.030: sourcing /home/xxxxx/.vim/plugged/goyo.vim/plugin/goyo.vim
157.430  000.067  000.067: sourcing /home/xxxxx/.vim/plugged/ultisnips/autoload/UltiSnips/map_keys.vim
157.514  000.883  000.816: sourcing /home/xxxxx/.vim/plugged/ultisnips/plugin/UltiSnips.vim
158.017  000.027  000.027: sourcing /home/xxxxx/.vim/plugged/vim-snippets/plugin/vimsnippets.vim
159.653  000.345  000.345: sourcing /home/xxxxx/.vim/plugged/AutoComplPop/autoload/acp.vim
159.797  001.316  000.971: sourcing /home/xxxxx/.vim/plugged/AutoComplPop/plugin/acp.vim
160.933  000.079  000.079: sourcing /home/xxxxx/.vim/plugged/vim-test/autoload/test.vim
161.579  001.316  001.237: sourcing /home/xxxxx/.vim/plugged/vim-test/plugin/test.vim
162.200  000.127  000.127: sourcing /home/xxxxx/.vim/plugged/csv.vim/plugin/csv.vim
162.838  000.150  000.150: sourcing /home/xxxxx/.vim/plugged/tabular/plugin/Tabular.vim
163.888  000.444  000.444: sourcing /home/xxxxx/.vim/plugged/vim-rails/plugin/rails.vim
164.673  000.060  000.060: sourcing /usr/share/vim/vim81/plugin/getscriptPlugin.vim
165.376  000.139  000.139: sourcing /usr/share/vim/vim81/plugin/gzip.vim
166.105  000.189  000.189: sourcing /usr/share/vim/vim81/plugin/logiPat.vim
166.676  000.028  000.028: sourcing /usr/share/vim/vim81/plugin/manpager.vim
167.399  000.126  000.126: sourcing /usr/share/vim/vim81/plugin/matchparen.vim
168.380  000.437  000.437: sourcing /usr/share/vim/vim81/plugin/netrwPlugin.vim
168.908  000.030  000.030: sourcing /usr/share/vim/vim81/plugin/rrhelper.vim
169.454  000.024  000.024: sourcing /usr/share/vim/vim81/plugin/spellfile.vim
169.933  000.127  000.127: sourcing /usr/share/vim/vim81/plugin/tarPlugin.vim
170.541  000.064  000.064: sourcing /usr/share/vim/vim81/plugin/tohtml.vim
171.054  000.159  000.159: sourcing /usr/share/vim/vim81/plugin/vimballPlugin.vim
171.474  000.136  000.136: sourcing /usr/share/vim/vim81/plugin/zipPlugin.vim
171.800  000.017  000.017: sourcing /usr/share/vim/vim81/pack/dist/opt/matchit/plugin/matchit.vim
171.805  021.969: loading plugins
171.844  000.039: loading packages
172.273  000.096  000.096: sourcing /home/xxxxx/.vim/plugged/ultisnips/after/plugin/UltiSnips_after.vim
173.214  000.151  000.151: sourcing /home/xxxxx/.vim/plugged/tabular/autoload/tabular.vim
174.380  001.804  001.653: sourcing /home/xxxxx/.vim/plugged/tabular/after/plugin/TabularMaps.vim
174.424  000.680: loading after plugins
174.433  000.009: inits 3
174.540  000.107: reading viminfo
32304.291  32129.751: setup clipboard
32304.420  000.129: setting raw mode
32304.444  000.024: start termcap
32304.516  000.072: clearing screen
32306.606  002.090: opening buffers
32306.795  000.189: BufEnter autocommands
32306.799  000.004: editing files in windows
32317.482  010.683: VimEnter autocommands
32317.486  000.004: before starting main loop
32325.208  005.293  005.293: sourcing /home/xxxxx/.vim/plugged/vim-fugitive/autoload/fugitive.vim
32325.493  002.714: first screen update
32325.494  000.001: --- VIM STARTED ---
raptoravis commented 4 years ago

this link can help solving it: https://stackoverflow.com/questions/14635295/vim-takes-a-very-long-time-to-start-up

nickjj commented 4 years ago

Someone contacted me once about this privately and it turns out it was due to their firewall. Windows defender needs to either be disabled, or instructed to allow VcXsrv and maybe even set up not to scan everything from WSL. Once they did that, it was really fast.

For reference here, Vim with or without -X opens in what feels to be less than 200ms. There's no perceivable difference in startup time using the exact vimrc in this repo.

Thanks for opening this issue tho, it's a good reminder that I should add a FAQ to the README to address common issues.