Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow performance / update delay #494

Closed
kenny1847 opened this issue Jun 26, 2018 · 7 comments
Closed

Slow performance / update delay #494

kenny1847 opened this issue Jun 26, 2018 · 7 comments

Comments

@kenny1847
Copy link

Got very big python file (16k LOC) so opening is extremely slow w/ tagbar.

$ vim --startuptime profile.log very_big_file.py
$ cat profile.log

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

000.006  000.006: --- VIM STARTING ---
000.079  000.073: Allocated generic buffers
000.148  000.069: locale set
000.157  000.009: GUI prepared
000.160  000.003: clipboard setup
000.163  000.003: window checked
000.507  000.344: inits 1
000.563  000.056: parsing arguments
000.565  000.002: expanding arguments
000.577  000.012: shell init
000.786  000.209: Termcap init
000.820  000.034: inits 2
000.960  000.140: init highlight
003.661  002.458  002.458: sourcing /home/kenny1847/.vim/colors/solarized.vim
005.630  001.468  001.468: sourcing /home/kenny1847/.vim/autoload/plug.vim
014.817  000.015  000.015: sourcing /home/kenny1847/.vim/plugged/vim-fugitive/ftdetect/fugitive.vim
014.922  000.018  000.018: sourcing /home/kenny1847/.vim/plugged/ultisnips/ftdetect/snippets.vim
015.022  005.691  005.658: sourcing /usr/local/share/vim/vim80/filetype.vim
015.220  000.036  000.036: sourcing /usr/local/share/vim/vim80/ftplugin.vim
015.430  000.032  000.032: sourcing /usr/local/share/vim/vim80/indent.vim
017.168  000.771  000.771: sourcing /usr/local/share/vim/vim80/syntax/syncolor.vim
017.626  000.180  000.180: sourcing /usr/local/share/vim/vim80/syntax/syncolor.vim
019.352  003.668  002.717: sourcing /home/kenny1847/.vim/colors/solarized.vim
020.001  004.354  000.686: sourcing /usr/local/share/vim/vim80/syntax/synload.vim
020.026  004.548  000.194: sourcing /usr/local/share/vim/vim80/syntax/syntax.vim
020.250  000.155  000.155: sourcing /home/kenny1847/.vim/plugged/CamelCaseMotion/autoload/camelcasemotion.vim
020.762  019.696  005.308: sourcing $HOME/.vimrc
021.130  000.202  000.202: sourcing .vimrc
021.133  000.275: sourcing vimrc file(s)
022.100  000.855  000.855: sourcing /home/kenny1847/.vim/plugged/a.vim/plugin/a.vim
022.299  000.141  000.141: sourcing /home/kenny1847/.vim/plugged/ack.vim/plugin/ack.vim
022.744  000.398  000.398: sourcing /home/kenny1847/.vim/plugged/CamelCaseMotion/plugin/camelcasemotion.vim
023.339  000.548  000.548: sourcing /home/kenny1847/.vim/plugged/fzf/plugin/fzf.vim
024.121  000.726  000.726: sourcing /home/kenny1847/.vim/plugged/fzf.vim/plugin/fzf.vim
024.223  000.053  000.053: sourcing /home/kenny1847/.vim/plugged/jedi-vim/plugin/jedi.vim
024.729  000.152  000.152: sourcing /home/kenny1847/.vim/plugged/nerdtree/autoload/nerdtree.vim
025.567  000.353  000.353: sourcing /home/kenny1847/.vim/plugged/nerdtree/lib/nerdtree/path.vim
025.701  000.084  000.084: sourcing /home/kenny1847/.vim/plugged/nerdtree/lib/nerdtree/menu_controller.vim
025.797  000.051  000.051: sourcing /home/kenny1847/.vim/plugged/nerdtree/lib/nerdtree/menu_item.vim
025.918  000.077  000.077: sourcing /home/kenny1847/.vim/plugged/nerdtree/lib/nerdtree/key_map.vim
026.133  000.159  000.159: sourcing /home/kenny1847/.vim/plugged/nerdtree/lib/nerdtree/bookmark.vim
026.340  000.161  000.161: sourcing /home/kenny1847/.vim/plugged/nerdtree/lib/nerdtree/tree_file_node.vim
026.718  000.332  000.332: sourcing /home/kenny1847/.vim/plugged/nerdtree/lib/nerdtree/tree_dir_node.vim
026.946  000.173  000.173: sourcing /home/kenny1847/.vim/plugged/nerdtree/lib/nerdtree/opener.vim
027.156  000.168  000.168: sourcing /home/kenny1847/.vim/plugged/nerdtree/lib/nerdtree/creator.vim
027.261  000.062  000.062: sourcing /home/kenny1847/.vim/plugged/nerdtree/lib/nerdtree/flag_set.vim
027.451  000.138  000.138: sourcing /home/kenny1847/.vim/plugged/nerdtree/lib/nerdtree/nerdtree.vim
027.716  000.225  000.225: sourcing /home/kenny1847/.vim/plugged/nerdtree/lib/nerdtree/ui.vim
027.779  000.021  000.021: sourcing /home/kenny1847/.vim/plugged/nerdtree/lib/nerdtree/event.vim
027.855  000.035  000.035: sourcing /home/kenny1847/.vim/plugged/nerdtree/lib/nerdtree/notifier.vim
028.199  000.295  000.295: sourcing /home/kenny1847/.vim/plugged/nerdtree/autoload/nerdtree/ui_glue.vim
029.902  000.082  000.082: sourcing /home/kenny1847/.vim/plugged/nerdtree/nerdtree_plugin/exec_menuitem.vim
030.312  000.398  000.398: sourcing /home/kenny1847/.vim/plugged/nerdtree/nerdtree_plugin/fs_menu.vim
030.581  006.315  003.349: sourcing /home/kenny1847/.vim/plugged/nerdtree/plugin/NERD_tree.vim
030.738  000.044  000.044: sourcing /home/kenny1847/.vim/plugged/neocomplete.vim/plugin/neocomplete/buffer.vim
030.785  000.036  000.036: sourcing /home/kenny1847/.vim/plugged/neocomplete.vim/plugin/neocomplete/dictionary.vim
030.832  000.037  000.037: sourcing /home/kenny1847/.vim/plugged/neocomplete.vim/plugin/neocomplete/member.vim
030.875  000.032  000.032: sourcing /home/kenny1847/.vim/plugged/neocomplete.vim/plugin/neocomplete/tag.vim
030.962  000.077  000.077: sourcing /home/kenny1847/.vim/plugged/neocomplete.vim/plugin/neocomplete.vim
031.142  000.011  000.011: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/autoloclist.vim
031.161  000.009  000.009: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/balloons.vim
031.177  000.007  000.007: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/checker.vim
031.193  000.007  000.007: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/cursor.vim
031.209  000.007  000.007: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/highlighting.vim
031.225  000.007  000.007: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/loclist.vim
031.241  000.007  000.007: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/modemap.vim
031.257  000.007  000.007: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/notifiers.vim
031.273  000.008  000.008: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/registry.vim
031.291  000.009  000.009: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/signs.vim
031.774  000.336  000.336: sourcing /home/kenny1847/.vim/plugged/syntastic/autoload/syntastic/util.vim
035.862  000.042  000.042: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/autoloclist.vim
035.913  000.038  000.038: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/balloons.vim
036.050  000.127  000.127: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/checker.vim
036.123  000.063  000.063: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/cursor.vim
036.187  000.054  000.054: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/highlighting.vim
036.393  000.196  000.196: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/loclist.vim
036.463  000.059  000.059: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/modemap.vim
036.520  000.047  000.047: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/notifiers.vim
036.896  000.366  000.366: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/registry.vim
037.073  000.162  000.162: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic/signs.vim
038.063  006.762  005.272: sourcing /home/kenny1847/.vim/plugged/syntastic/plugin/syntastic.vim
038.948  000.835  000.835: sourcing /home/kenny1847/.vim/plugged/vim-abolish/plugin/abolish.vim
039.325  000.108  000.108: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/init.vim
039.834  000.264  000.264: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/parts.vim
040.452  001.464  001.092: sourcing /home/kenny1847/.vim/plugged/vim-airline/plugin/airline.vim
040.512  000.014  000.014: sourcing /home/kenny1847/.vim/plugged/vim-airline-themes/plugin/airline-themes.vim
041.134  000.582  000.582: sourcing /home/kenny1847/.vim/plugged/vim-better-whitespace/plugin/better-whitespace.vim
041.373  000.083  000.083: sourcing /home/kenny1847/.vim/plugged/vim-operator-user/autoload/operator/user.vim
041.559  000.380  000.297: sourcing /home/kenny1847/.vim/plugged/vim-clang-format/plugin/clang_format.vim
041.744  000.142  000.142: sourcing /home/kenny1847/.vim/plugged/vim-commentary/plugin/commentary.vim
042.906  001.108  001.108: sourcing /home/kenny1847/.vim/plugged/vim-dispatch/plugin/dispatch.vim
046.678  003.726  003.726: sourcing /home/kenny1847/.vim/plugged/vim-easymotion/plugin/EasyMotion.vim
046.917  000.166  000.166: sourcing /home/kenny1847/.vim/plugged/vim-fugitive/plugin/fugitive.vim
061.191  014.183  014.183: sourcing /home/kenny1847/.vim/plugged/vim-rtags/plugin/rtags.vim
061.699  000.438  000.438: sourcing /home/kenny1847/.vim/plugged/vim-surround/plugin/surround.vim
063.680  001.931  001.931: sourcing /home/kenny1847/.vim/plugged/vim-unimpaired/plugin/unimpaired.vim
063.835  000.072  000.072: sourcing /home/kenny1847/.vim/plugged/vimproc.vim/plugin/vimproc.vim
064.636  000.743  000.743: sourcing /home/kenny1847/.vim/plugged/tagbar/plugin/tagbar.vim
064.979  000.055  000.055: sourcing /home/kenny1847/.vim/plugged/ultisnips/autoload/UltiSnips/map_keys.vim
065.056  000.363  000.308: sourcing /home/kenny1847/.vim/plugged/ultisnips/plugin/UltiSnips.vim
065.272  000.050  000.050: sourcing /usr/local/share/vim/vim80/plugin/getscriptPlugin.vim
065.427  000.142  000.142: sourcing /usr/local/share/vim/vim80/plugin/gzip.vim
065.617  000.176  000.176: sourcing /usr/local/share/vim/vim80/plugin/logiPat.vim
065.660  000.023  000.023: sourcing /usr/local/share/vim/vim80/plugin/manpager.vim
065.798  000.126  000.126: sourcing /usr/local/share/vim/vim80/plugin/matchparen.vim
066.253  000.434  000.434: sourcing /usr/local/share/vim/vim80/plugin/netrwPlugin.vim
066.309  000.032  000.032: sourcing /usr/local/share/vim/vim80/plugin/rrhelper.vim
066.348  000.021  000.021: sourcing /usr/local/share/vim/vim80/plugin/spellfile.vim
066.481  000.118  000.118: sourcing /usr/local/share/vim/vim80/plugin/tarPlugin.vim
066.565  000.068  000.068: sourcing /usr/local/share/vim/vim80/plugin/tohtml.vim
066.723  000.143  000.143: sourcing /usr/local/share/vim/vim80/plugin/vimballPlugin.vim
066.884  000.133  000.133: sourcing /usr/local/share/vim/vim80/plugin/zipPlugin.vim
066.900  002.051: loading plugins
066.939  000.039: loading packages
067.108  000.090  000.090: sourcing /home/kenny1847/.vim/plugged/ultisnips/after/plugin/UltiSnips_after.vim
067.119  000.090: loading after plugins
067.619  000.500: inits 3
067.858  000.239: reading viminfo
069.006  001.148: setup clipboard
069.026  000.020: setting raw mode
069.029  000.003: start termcap
069.055  000.026: clearing screen
078.570  000.033  000.033: sourcing /home/kenny1847/.vim/plugged/yapf/plugins/vim/plugin/yapf.vim
154.409  075.466  075.466: sourcing /home/kenny1847/.vim/plugged/jedi-vim/autoload/jedi.vim
154.463  075.574  000.108: sourcing /home/kenny1847/.vim/plugged/jedi-vim/ftplugin/python/jedi.vim
155.372  000.495  000.495: sourcing /usr/local/share/vim/vim80/ftplugin/python.vim
155.609  000.030  000.030: sourcing /home/kenny1847/.vim/plugged/jedi-vim/after/ftplugin/python/jedi.vim
155.963  000.111  000.111: sourcing /usr/local/share/vim/vim80/indent/python.vim
156.215  000.048  000.048: sourcing /home/kenny1847/.vim/plugged/jedi-vim/ftplugin/python/jedi.vim
156.584  000.010  000.010: sourcing /usr/local/share/vim/vim80/ftplugin/python.vim
156.782  000.020  000.020: sourcing /home/kenny1847/.vim/plugged/jedi-vim/after/ftplugin/python/jedi.vim
156.999  000.023  000.023: sourcing /usr/local/share/vim/vim80/indent/python.vim
157.799  000.457  000.457: sourcing /usr/local/share/vim/vim80/syntax/python.vim
157.936  000.083  000.083: sourcing /home/kenny1847/.vim/plugged/jedi-vim/after/syntax/python.vim
158.293  000.180  000.180: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions.vim
158.429  000.043  000.043: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/quickfix.vim
158.602  000.102  000.102: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline.vim
158.737  000.027  000.027: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/netrw.vim
158.847  000.018  000.018: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/term.vim
159.022  000.046  000.046: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/tagbar.vim
159.210  000.079  000.079: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/util.vim
159.449  000.162  000.162: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/branch.vim
159.638  000.042  000.042: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/fugitiveline.vim
159.795  000.038  000.038: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/syntastic.vim
160.005  000.094  000.094: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/whitespace.vim
160.311  000.032  000.032: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/po.vim
160.447  000.035  000.035: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/wordcount.vim
160.656  000.110  000.110: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/tabline.vim
160.790  000.039  000.039: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/autoshow.vim
161.084  000.073  000.073: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/tabs.vim
161.325  000.127  000.127: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/buffers.vim
161.516  000.023  000.023: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/keymap.vim
163.307  000.055  000.055: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/section.vim
163.607  000.144  000.144: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/highlighter.vim
165.574  000.047  000.047: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/themes.vim
165.788  000.541  000.494: sourcing /home/kenny1847/.vim/plugged/vim-airline-themes/autoload/airline/themes/solarized.vim
173.530  000.124  000.124: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/builder.vim
173.827  000.063  000.063: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/default.vim
193.889  002.356  002.356: sourcing /home/kenny1847/.vim/plugged/vim-fugitive/autoload/fugitive.vim
195.022  000.150  000.150: sourcing /home/kenny1847/.vim/plugged/syntastic/autoload/syntastic/log.vim
195.264  044.622: opening buffers
196.005  000.741: BufEnter autocommands
196.007  000.002: editing files in windows
203.140  007.133: VimEnter autocommands
203.142  000.002: before starting main loop
203.595  000.088  000.088: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/ctrlspace.vim
203.944  000.112  000.112: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/builder.vim
206.737  000.047  000.047: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/buflist.vim
206.941  000.051  000.051: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/default.vim
215.042  000.133  000.133: sourcing /home/kenny1847/.vim/plugged/vim-airline/autoload/airline/async.vim
218.082  001.675  001.675: sourcing /home/kenny1847/.vim/plugged/tagbar/autoload/tagbar.vim
218.345  000.060  000.060: sourcing /home/kenny1847/.vim/plugged/tagbar/autoload/tagbar/debug.vim
227.258  000.297  000.297: sourcing /home/kenny1847/.vim/plugged/tagbar/autoload/tagbar/types/ctags.vim
227.453  000.032  000.032: sourcing /home/kenny1847/.vim/plugged/tagbar/autoload/tagbar/prototypes/typeinfo.vim
232.154  000.084  000.084: sourcing /home/kenny1847/.vim/plugged/tagbar/autoload/tagbar/prototypes/fileinfo.vim
288.186  000.147  000.147: sourcing /home/kenny1847/.vim/plugged/tagbar/autoload/tagbar/prototypes/normaltag.vim
288.461  000.125  000.125: sourcing /home/kenny1847/.vim/plugged/tagbar/autoload/tagbar/prototypes/basetag.vim
48025.746  000.059  000.059: sourcing /home/kenny1847/.vim/plugged/tagbar/autoload/tagbar/prototypes/kindheadertag.vim
48053.646  000.069  000.069: sourcing /home/kenny1847/.vim/plugged/tagbar/autoload/tagbar/sorting.vim
48200.799  000.055  000.055: sourcing /home/kenny1847/.vim/plugged/tagbar/autoload/tagbar/state.vim
48245.088  48038.912: first screen update
48245.089  000.001: --- VIM STARTED ---
@starifly
Copy link

same problem, when open big Makefile(about 9m), scroll becomes very slowly

@narcolepsy
Copy link

Am seeing this problem on some verilog files (using verilog_systemverilog syntax plugin) - file size only 800kB

@alerque
Copy link
Member

alerque commented Oct 22, 2019

@kenny1847, @starifly, and @narcolepsy — what you you have vim's updatetime value configured? Try :set updatetime to view the value, and set it to something lower if you want faster refreshes.

I'm guessing there is a better way to do this overall using an autocommand hook so I"m going to leave this issue open to look into that, but I suspect for most of you having a too-big updatetime value is your only issue. Please feel free to comment here on whether or not that addresses your issue.

@alerque alerque added the bug label Oct 22, 2019
@alerque
Copy link
Member

alerque commented Oct 22, 2019

At the very least to fix this issue it should be documented how this value affects the plugin's apparent performance because it seems like a lot of people deal with this.

@alerque alerque changed the title extreme slow performance on python file Slow performance / update delay Oct 22, 2019
@narcolepsy
Copy link

updatetime=4000

@alerque
Copy link
Member

alerque commented Oct 23, 2019

@narcolepsy With that setting tagbar will not even start updating until 4 seconds have passed since the last cursor activity.

@alerque
Copy link
Member

alerque commented May 29, 2020

The startup time issue is a duplicate of #477 — we shouldn't be doing a tags run that blocks the main thread when first opening files until some tagbar view is requested or we can run it in the background. Period.

The update delay is a different issue that the startup time one, but I believe that would be resolved by a smaller updatetime value.

@starifly Scrolling is a different issue and shouldn't even be a function of this plugin at all. If you still have that issue please open it as a separate issue.

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

No branches or pull requests

4 participants