neoclide / coc-highlight

Document highlight and document colors LSP support for coc.nvim
226 stars 12 forks source link

在远程的vim中容易造成卡顿 #64

Closed Leeeooooo closed 1 year ago

Leeeooooo commented 1 year ago

使用vim9.0 patches: 1-1721版本,通过x11转发远程ssh登录使用vim,打开较大文件后用鼠标点击一些重复出现的字段就会造成卡顿,大约30s "documentHighlight.timeout": 300,这个参数似乎没有起作用 下面是vim的profile:

FUNCTIONS SORTED ON TOTAL TIME
count     total (s)      self (s)  function
   24  39.544621220   0.001417911  coc#api#notify()
   83  39.540419146   0.003556463  14()
   17  39.493277391   0.003361428  10()
   11  39.465858174   1.195659071  coc#highlight#match_ranges()
16852  38.270199103                coc#string#byte_index()
   17   0.324125074                <SNR>33_execute()
   18   0.062008602                coc#highlight#clear_match_group()
   12   0.060328127   0.005637525  signature#sign#Refresh()
   44   0.036970401   0.000589137  qline#Statusline()
   44   0.035796056   0.030735091  <SNR>133_Statusline()
   94   0.028818657   0.004714733  coc#api#call()
   24   0.027472464                signature#mark#GetList()
  624   0.024138953   0.021591898  signature#sign#Remove()
   43   0.021801012   0.000970711  17()
   14   0.021417737   0.004216696  sy#start()
  440   0.019422681   0.002877345  <SNR>133_GetComponent()
   17   0.017173670   0.010763414  coc#util#get_bufoptions()
   14   0.016343683   0.014380204  sy#repo#get_diff()
  440   0.015586197   0.005120966  <SNR>133_GetComponentContent()
 1498   0.014198501                qline#config#Get()

FUNCTIONS SORTED ON SELF TIME
count     total (s)      self (s)  function
16852                38.270199103  coc#string#byte_index()
   11  39.465858174   1.195659071  coc#highlight#match_ranges()
   17                 0.324125074  <SNR>33_execute()
   18                 0.062008602  coc#highlight#clear_match_group()
   44   0.035796056   0.030735091  <SNR>133_Statusline()
   24                 0.027472464  signature#mark#GetList()
  624   0.024138953   0.021591898  signature#sign#Remove()
   14   0.016343683   0.014380204  sy#repo#get_diff()
 1498                 0.014198501  qline#config#Get()
   17   0.017173670   0.010763414  coc#util#get_bufoptions()
   17                 0.006018463  coc#util#variables()
   12   0.060328127   0.005637525  signature#sign#Refresh()
  440   0.015586197   0.005120966  <SNR>133_GetComponentContent()
   12   0.006421871   0.004784640  coc#vtext#add()
   94   0.028818657   0.004714733  coc#api#call()
   14   0.021417737   0.004216696  sy#start()
   24   0.004724687   0.004196681  <SNR>89_Highlight_Matching_Pair()
   52   0.004437896   0.004169909  <SNR>32_notify()
   83  39.540419146   0.003556463  14()
   14   0.004229882   0.003392158  sy#sign#process_diff()
chemzqm commented 1 year ago

应该是和 https://github.com/neoclide/coc.nvim/issues/4577 一个问题

chemzqm commented 1 year ago

Should be fixed on latest coc.nvim.