0

I'm using vim with many plugins, the .vimrc file has a big number of plugins, but yet it was very fast, and suddenly for some reason it's not any more, not sure may be after I started using eslinter, it takes about two second every time I save a file, or open a file in a new tab. Is there any way I can find which plugin that is causing all that delay?

FUNCTIONS SORTED ON TOTAL TIME 
count  total (s)   self (s)  function
    1   1.193202   0.000100  <SNR>67_BufWritePostHook()
    1   1.192941   0.000469  <SNR>67_UpdateErrors()
    1   1.188491   0.000942  <SNR>67_CacheErrors()
    1   1.184402   0.000040  287()
    1   1.184210   0.000254  286()
    1   1.183663   0.000135  SyntaxCheckers_javascript_eslint_GetLocList()
    1   1.182540   0.000674  SyntasticMake()
    1   1.181614   0.000483  syntastic#util#system()
    3   0.023413   0.000393  airline#extensions#tabline#get()
    3   0.023020   0.001615  airline#extensions#tabline#tabs#get()
   12   0.022842   0.010081  <SNR>180_parse_screen()
    2   0.018991   0.003055  381()
   12   0.012386             <SNR>180_create_matches()
   12   0.011903   0.002183  <SNR>172_OnCursorMovedNormalMode()
    8   0.011681   0.000275  <SNR>157_get_seperator()
   14   0.010961   0.010719  <SNR>172_OnFileReadyToParse()
   46   0.009832   0.003413  airline#highlighter#get_highlight()
   10   0.009530   0.000443  <SNR>157_get_transitioned_seperator()
   10   0.009087   0.000364  airline#highlighter#add_separator()
   10   0.008723   0.000830  <SNR>153_exec_separator()

FUNCTIONS SORTED ON SELF TIME 
count  total (s)   self (s)  function
   12              0.012386  <SNR>180_create_matches()
   14   0.010961   0.010719  <SNR>172_OnFileReadyToParse()
   12   0.022842   0.010081  <SNR>180_parse_screen()
   92              0.005751  <SNR>153_get_syn()
   46   0.009832   0.003413  airline#highlighter#get_highlight()
   13              0.003297  <SNR>123_Highlight_Matching_Pair()
    2   0.018991   0.003055  381()
    1   0.002336   0.002331  gitgutter#sign#remove_signs()
   12   0.011903   0.002183  <SNR>172_OnCursorMovedNormalMode()
    3              0.001629  airline#extensions#tabline#tabs#map_keys()
    3   0.023020   0.001615  airline#extensions#tabline#tabs#get()
    1   0.001750   0.001601  gitgutter#async#execute()
   12              0.001445  <SNR>146_update()
    1   0.001305   0.001302  gitgutter#sign#find_current_signs()
   12              0.001276  <SNR>157_get_accented_line()
   14              0.001155  <SNR>172_AllowedToCompleteInBuffer()
   10   0.003474   0.001059  airline#highlighter#exec()
    2   0.001717   0.000985  xolox#misc#cursorhold#autocmd()
    1   0.002802   0.000983  347()
    1   0.001208   0.000966  gitgutter#sign#upsert_new_gitgutter_signs()
challenger
  • 2,184
  • 1
  • 18
  • 25
  • 1
    Whatever plugin you use for linting is causing that lag. The usual suspect is Syntastic. – romainl Feb 12 '17 at 14:57
  • @romainl what do you think i have to do, I can't stop using it.. – challenger Feb 12 '17 at 15:20
  • 1
    @challenger, use [this answer](http://stackoverflow.com/a/12216578/5048383) and check which plugin causing the delay. if its *Syntastic* and you use Neovim or vim > 8.0 an excelent alternate plugin is [w0rp/ale](https://github.com/w0rp/ale) which acts anynchronous using vim job control functions. – dNitro Feb 12 '17 at 15:38
  • @dNitro thanks for the great link, I did what is there in that answer, it worked and I updated my question, I really don't get it a lot , there is the count column on the left too... do you know which one mostly causing the problem – challenger Feb 12 '17 at 16:20
  • 1
    List is sorted by total execution time of functions. so the slowest are three function from your `67` plugin. in vim type `:script` and see number 67 is which one. – dNitro Feb 12 '17 at 16:33
  • @dNitro what do you mean by 'see number 67' ? is it a plugin number? how to know which one is it ? – challenger Feb 12 '17 at 16:36
  • 1
    when you type `:script` it gives you a list and their related SNR number. – dNitro Feb 12 '17 at 16:37
  • 67: ~/.vim/bundle/syntastic/plugin/syntastic.vim thanks a lot... it's syntastic.. I will us the other one you provide.. @dNitro – challenger Feb 12 '17 at 16:40
  • **syntastic** and **vim-airline**, two plugins that i also removed because of performance issues. vim is very faster without those two. – dNitro Feb 12 '17 at 16:43
  • 1
    So that was syntastic? What a *surprise*… – romainl Feb 12 '17 at 17:18
  • 2
    If you use syntastic you're supposed to configure it to suit your needs. If it's too slow then you can turn on passive mode: `let g:syntastic_mode_map = {'mode': 'passive'}`. Done. On a side note: what a _surprise_ @romainl is not surprised. :) – lcd047 Feb 12 '17 at 17:42
  • @romainl hahahahaa, sorry romaini for not believing you without evidence :p – challenger Feb 12 '17 at 17:45
  • @lcd047 thanks I will try it.. – challenger Feb 12 '17 at 17:47
  • @lcd047 I added that but it stopped working, I have a .eslinter.js file, but as if I removed the plugin..!!! – challenger Feb 12 '17 at 17:59
  • 2
    Did you read the manual? You can still run checks with `:SyntasticCheck`, and you can switch back to active mode with `:SyntasticToggleMode`. – lcd047 Feb 12 '17 at 18:00
  • @lcd047 I was reading them.. I'm using them now, added an alias for it.. any way I wanna give the ale plugin a try.. – challenger Feb 12 '17 at 18:15
  • @romainl I prefer to look at it from a different angle: any kick is ultimately a step forward. :) – lcd047 Feb 12 '17 at 18:34
  • @dNitro how to run that ale... as if it's not exist.. did every thing in docs – challenger Feb 12 '17 at 18:41
  • 1
    @challenger, if you are having linters installed, it will automatically run them on entering, saving and or editing a buffer ( you could control this behaviour by setting `g:ale_lint_on_enter`, `g:ale_lint_on_save`, `g:ale_lint_on_text_changed` global options). if you want to run it manually just call [ale#Queue](https://github.com/w0rp/ale/blob/a995daa82704740717377e1d9c03785b9b3f2a63/doc/ale.txt#L1063-L1067); `:call ale#Queue(0)` – dNitro Feb 12 '17 at 20:33
  • 1
    @dNitro it seems that it just needed laptop restart... it's working now!!.. this is great, it's like it need no time, much much better that syntactic.. thanks a lot. – challenger Feb 13 '17 at 09:28

0 Answers0