ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.42k stars 2.81k forks source link

OnCursorMovedNormalMode is super slow in java file with errors #3415

Closed ghost closed 4 years ago

ghost commented 5 years ago

I hava javacomplete turned on.

If I am editing a Java file with a few errors in it, simple using hjkl to scroll through the file is extremely slow and laggy.

This is because OnCursorMovedNormalMode is super slow and laggy,

I did a quick profile:

FUNCTIONS SORTED ON SELF TIME
count  total (s)   self (s)  function                                                                               
  351   7.136789   7.100169  <SNR>77_OnCursorMovedNormalMode()

every other function from every other plugin took less than 0.2 s, in fact that was another outlier, most took less than 0.05.

Please help fix this, and ask me for more debugging info (I can easily reproduce this, but am not sure how to trap/track the source of the extreme lag).

bstaletic commented 5 years ago

You didn't leave much information needed for diagnosing this. Does the issue stop if you add let g:ycm_echo_current_diagnostic = 0? Can you post steps to reproduce the issue? What's the output of let g:ycm_max_diagnostics_to_display?

bstaletic commented 4 years ago

No response. Closing.