xolox / vim-easytags

Automated tag file generation and syntax highlighting of tags in Vim
http://peterodding.com/code/vim/easytags/
1.01k stars 109 forks source link

Easytags freezes when saving cpp files #125

Open paschalis-mpeis opened 8 years ago

paschalis-mpeis commented 8 years ago

When I am saving C++ files, easytags freezes vim for many seconds. I know, in the troubleshooting it states that it is slow, but it exceedingly slow given that I am just using a single pair of .cpp/.h files, with less than 10 lines of code. In contrary, with C files and much larger code size the plugin does just fine.

Using the async option hides the problem, since VIM does not freeze. However, I believe sharing some information here could help tracking down the real problem.

I have recently installed YouCompleteMe plugin, and I am using the macvim command line editor. This was my first attempt on writing C++ using VIM.

Below you can find some profiling information:

#FUNCTIONS SORTED ON TOTAL TIME
count  total (s)   self (s)  function
    2  12.262764   0.001205  xolox#easytags#autoload()
    1  10.670012   0.001436  xolox#easytags#update()
    1  10.666549   0.077489  xolox#easytags#update#with_vim()
    1  10.563979   0.777872  <SNR>129_filter_merge_tags()
    1   4.658425   3.259885  xolox#easytags#update#read_tagsfile()
    1   2.757879   0.141357  xolox#easytags#update#write_tagsfile()
    1   1.591229   0.009341  xolox#easytags#highlight()
    4   1.581735   1.581066  <SNR>67_highlight_with_python()
    1   1.453871   0.678835  xolox#easytags#update#join_entries()
173070   1.398575             xolox#easytags#update#parse_entry()
    1   1.162637   1.147011  xolox#misc#perm#update()
173067   0.775036             xolox#easytags#update#join_entry()
 2044   0.442805   0.023391  xolox#easytags#utils#canonicalize()
 2046   0.368466   0.187532  xolox#misc#path#absolute()
 2046   0.101541             xolox#misc#path#split()
 2045   0.051427   0.019140  xolox#easytags#utils#resolve()
 2046   0.046790             xolox#misc#path#join()
    2   0.040056   0.001424  xolox#misc#os#exec()
 2062   0.032637             xolox#misc#option#get()
 2046   0.032603             xolox#misc#path#is_relative()

#FUNCTIONS SORTED ON SELF TIME
count  total (s)   self (s)  function
    1   4.658425   3.259885  xolox#easytags#update#read_tagsfile()
    4   1.581735   1.581066  <SNR>67_highlight_with_python()
173070              1.398575  xolox#easytags#update#parse_entry()
    1   1.162637   1.147011  xolox#misc#perm#update()
    1  10.563979   0.777872  <SNR>129_filter_merge_tags()
173067              0.775036  xolox#easytags#update#join_entry()
    1   1.453871   0.678835  xolox#easytags#update#join_entries()
 2046   0.368466   0.187532  xolox#misc#path#absolute()
    1   2.757879   0.141357  xolox#easytags#update#write_tagsfile()
 2046              0.101541  xolox#misc#path#split()
    1  10.666549   0.077489  xolox#easytags#update#with_vim()
 2046              0.046790  xolox#misc#path#join()
 2062              0.032637  xolox#misc#option#get()
 2046              0.032603  xolox#misc#path#is_relative()
 2044   0.442805   0.023391  xolox#easytags#utils#canonicalize()
 2045   0.051427   0.019140  xolox#easytags#utils#resolve()
    1   1.591229   0.009341  xolox#easytags#highlight()
    2   0.030983   0.008165  <SNR>31_runShellCommand()
  158              0.006699  airline#highlighter#exec()
    2   0.019678   0.005875  airline#highlighter#highlight()