-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
.e.g, 2 file is buffered in vim, a.c, b.c, and a.c is displayed in current window, after ycm compile this file(took about 18s, this is a large project and is on cifs), the auto-hover function will took about less than 100ms, and then switch to another buffer b.c, same as a.c, take some time to parse and then auto-hover worked normally, then:
then switch back to a.c, it still takes about 18s to recompile, it's weird that seems ycmd doesn't cache previous opened file and need to recompile everytime when switch buffer
is this a problem? or just normal behavior, i also tried clangd_uses_ycmd_caching=0, but no effect
my operation:
- open a.c, wait for hover work normally
- :YcmCompleter GoTo, this open b.c, wait for hover
- press Ctrl+O jump back to a.c and wait for hover
- repeat 2-3
here is part of the log:
I[15:07:37.308] clangd version 19.1.0 (https://github.com/ycm-core/llvm 6355059428ba8b509409c352f953b0602d29595c)
I[15:07:37.308] Features: linux
I[15:07:37.308] PID: 13235
I[15:07:37.308] Working directory: /home/u1sh
I[15:07:37.308] argv[0]: /home/u1sh/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/clangd/output/bin/clangd
I[15:07:37.308] argv[1]: -header-insertion-decorators=0
I[15:07:37.308] argv[2]: -resource-dir=/home/u1sh/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/clang/lib/clang/19.1.0
I[15:07:37.308] argv[3]: -limit-results=500
I[15:07:37.308] Starting LSP over stdin/stdout
I[15:07:37.308] <-- initialize(1)
I[15:07:37.308] --> reply:initialize(1) 0 ms
I[15:07:37.309] <-- initialized
I[15:07:37.309] <-- workspace/didChangeConfiguration
I[15:07:37.312] <-- workspace/didChangeConfiguration
I[15:07:37.451] Failed to find compilation database for /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/apptr069/event/tr069_event_trans_bootstrap.c
I[15:07:37.452] Enqueueing 1 commands for indexing
I[15:07:37.452] <-- textDocument/didOpen
I[15:07:37.453] <-- textDocument/semanticTokens/full(2)
I[15:07:37.453] <-- textDocument/inlayHint(3)
I[15:07:37.476] ASTWorker building file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/apptr069/event/tr069_event_trans_bootstrap.c version 1 with command
[/mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common]
/usr/lib/llvm-18/bin/clang-tool ...
I[15:07:37.606] <-- textDocument/hover(4)
I[15:07:52.399] <-- textDocument/inlayHint(5)
I[15:07:52.408] <-- textDocument/semanticTokens/full(6)
I[15:07:59.467] Built preamble of size 2440708 for file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/apptr069/event/tr069_event_trans_bootstrap.c version 1 in 21.99 seconds
I[15:07:59.560] Indexing c99 standard library in the context of /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/apptr069/event/tr069_event_trans_bootstrap.c
E[15:08:00.078] IncludeCleaner: Failed to get an entry for resolved path : No such file or directory
I[15:08:00.226] --> textDocument/publishDiagnostics
I[15:08:00.227] --> reply:textDocument/semanticTokens/full(2) 22774 ms
I[15:08:00.228] --> reply:textDocument/inlayHint(3) 22775 ms
I[15:08:00.228] --> reply:textDocument/hover(4) 22621 ms
I[15:08:00.228] --> reply:textDocument/inlayHint(5) 7829 ms
I[15:08:00.229] --> reply:textDocument/semanticTokens/full(6) 7821 ms
I[15:08:01.557] <-- textDocument/hover(7)
I[15:08:01.720] --> reply:textDocument/hover(7) 162 ms
I[15:08:02.456] <-- textDocument/hover(8)
I[15:08:02.462] --> reply:textDocument/hover(8) 5 ms
I[15:08:03.173] <-- textDocument/hover(9)
E[15:08:03.323] IncludeCleaner: Failed to get an entry for resolved path : No such file or directory
I[15:08:03.323] --> reply:textDocument/hover(9) 150 ms
I[15:08:03.495] <-- textDocument/semanticTokens/full(10)
I[15:08:03.495] --> reply:textDocument/semanticTokens/full(10) 0 ms
I[15:08:03.497] <-- textDocument/inlayHint(11)
I[15:08:03.498] --> reply:textDocument/inlayHint(11) 0 ms
I[15:08:03.829] <-- textDocument/hover(12)
I[15:08:03.830] --> reply:textDocument/hover(12) 0 ms
I[15:08:04.146] <-- textDocument/hover(13)
E[15:08:04.154] IncludeCleaner: Failed to get an entry for resolved path : No such file or directory
I[15:08:04.155] --> reply:textDocument/hover(13) 9 ms
I[15:08:05.801] <-- textDocument/hover(14)
E[15:08:06.017] IncludeCleaner: Failed to get an entry for resolved path : No such file or directory
I[15:08:06.018] --> reply:textDocument/hover(14) 216 ms
I[15:08:06.117] <-- textDocument/hover(15)
E[15:08:06.117] IncludeCleaner: Failed to get an entry for resolved path : No such file or directory
I[15:08:06.118] --> reply:textDocument/hover(15) 0 ms
I[15:08:07.425] Indexed c99 standard library (incomplete due to errors): 1846 symbols, 542 filtered
I[15:09:11.891] <-- textDocument/hover(16)
E[15:09:11.979] IncludeCleaner: Failed to get an entry for resolved path : No such file or directory
I[15:09:11.980] --> reply:textDocument/hover(16) 88 ms
I[15:09:12.525] <-- textDocument/definition(17)
I[15:09:12.525] --> reply:textDocument/definition(17) 0 ms
I[15:09:12.640] <-- textDocument/didOpen
I[15:09:12.643] <-- textDocument/semanticTokens/full(18)
I[15:09:12.643] <-- textDocument/inlayHint(19)
I[15:09:12.666] <-- workspace/didChangeConfiguration
I[15:09:12.815] Failed to find compilation database for /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/include/cfapi/csp_tr069_adaptor.h
I[15:09:12.815] Failed to find compilation database for /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/include/cfapi/csp_tr069_adaptor.h
I[15:09:12.816] Enqueueing 1 commands for indexing
I[15:09:12.816] File version went from 1 to 1
I[15:09:12.816] ASTWorker building file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/include/cfapi/csp_tr069_adaptor.h version 1 with command inferred from /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/apptr069/event/tr069_event_trans_bootstrap.c
[/mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common]
/usr/lib/llvm-18/bin/clang-tool -Wall -Wextra ...
I[15:09:12.816] <-- textDocument/didChange
I[15:09:13.009] <-- textDocument/hover(20)
I[15:09:13.317] ASTWorker building file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/apptr069/event/tr069_event_trans_bootstrap.c version 2 with command
[/mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common]
/usr/lib/llvm-18/bin/clang-tool ...
I[15:09:13.418] Built preamble of size 296640 for file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/apptr069/event/tr069_event_trans_bootstrap.c version 2 in 0.10 seconds
I[15:09:13.498] --> textDocument/publishDiagnostics
I[15:09:13.549] --> textDocument/publishDiagnostics
I[15:09:27.336] Built preamble of size 2092228 for file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/include/cfapi/csp_tr069_adaptor.h version 1 in 14.52 seconds
I[15:09:27.504] --> textDocument/publishDiagnostics
I[15:09:27.505] --> reply:textDocument/semanticTokens/full(18) 14862 ms
I[15:09:27.506] --> reply:textDocument/inlayHint(19) 14862 ms
I[15:09:27.506] ASTWorker building file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/include/cfapi/csp_tr069_adaptor.h version 1 with command
[/mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common]
/usr/lib/llvm-18/bin/clang-tool ...
I[15:09:27.529] <-- textDocument/inlayHint(21)
I[15:09:27.536] <-- textDocument/semanticTokens/full(22)
I[15:09:27.542] --> textDocument/publishDiagnostics
I[15:09:27.543] --> reply:textDocument/hover(20) 14533 ms
I[15:09:27.543] --> reply:textDocument/inlayHint(21) 13 ms
I[15:09:27.543] --> reply:textDocument/semanticTokens/full(22) 7 ms
I[15:09:39.931] Built preamble of size 2092228 for file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/include/cfapi/csp_tr069_adaptor.h version 1 in 12.42 seconds
I[15:09:40.077] --> textDocument/publishDiagnostics
I[15:11:19.355] <-- textDocument/didChange
I[15:11:19.361] <-- textDocument/semanticTokens/full(23)
I[15:11:19.361] <-- textDocument/inlayHint(24)
I[15:11:19.373] <-- textDocument/didChange
I[15:11:19.393] ASTWorker building file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/apptr069/event/tr069_event_trans_bootstrap.c version 3 with command
[/mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common]
/usr/lib/llvm-18/bin/clang-tool ...
I[15:11:19.499] ASTWorker building file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/include/cfapi/csp_tr069_adaptor.h version 2 with command
[/mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common]
/usr/lib/llvm-18/bin/clang-tool ...
I[15:11:19.560] --> textDocument/publishDiagnostics
I[15:11:19.716] <-- textDocument/hover(25)
I[15:11:19.954] Built preamble of size 296604 for file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/include/cfapi/csp_tr069_adaptor.h version 2 in 0.45 seconds
I[15:11:19.958] --> textDocument/publishDiagnostics
E[15:11:36.708] IncludeCleaner: Failed to get an entry for resolved path : No such file or directory
I[15:11:36.797] --> textDocument/publishDiagnostics
I[15:11:36.819] Built preamble of size 2440708 for file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/apptr069/event/tr069_event_trans_bootstrap.c version 3 in 17.42 seconds
I[15:11:36.829] --> reply:textDocument/semanticTokens/full(23) 17468 ms
E[15:11:37.011] IncludeCleaner: Failed to get an entry for resolved path : No such file or directory
I[15:11:37.098] --> textDocument/publishDiagnostics
I[15:11:37.099] --> reply:textDocument/inlayHint(24) 17737 ms
E[15:11:37.099] IncludeCleaner: Failed to get an entry for resolved path : No such file or directory
I[15:11:37.099] --> reply:textDocument/hover(25) 17383 ms
I[15:12:04.250] <-- textDocument/didChange
I[15:12:04.250] <-- textDocument/semanticTokens/full(26)
I[15:12:04.250] <-- textDocument/inlayHint(27)
I[15:12:04.266] <-- textDocument/didChange
I[15:12:04.286] ASTWorker building file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/include/cfapi/csp_tr069_adaptor.h version 3 with command
[/mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common]
/usr/lib/llvm-18/bin/clang-tool ...
I[15:12:04.522] ASTWorker building file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/apptr069/event/tr069_event_trans_bootstrap.c version 4 with command
[/mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common]
/usr/lib/llvm-18/bin/clang-tool ...
I[15:12:04.556] --> textDocument/publishDiagnostics
I[15:12:04.602] <-- textDocument/hover(28)
I[15:12:04.813] Built preamble of size 296640 for file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/apptr069/event/tr069_event_trans_bootstrap.c version 4 in 0.29 seconds
I[15:12:04.818] --> textDocument/publishDiagnostics
I[15:12:20.006] Built preamble of size 2092228 for file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/include/cfapi/csp_tr069_adaptor.h version 3 in 15.72 seconds
I[15:12:20.014] --> textDocument/publishDiagnostics
I[15:12:20.116] --> textDocument/publishDiagnostics
I[15:12:20.117] --> reply:textDocument/semanticTokens/full(26) 15866 ms
I[15:12:20.117] --> reply:textDocument/inlayHint(27) 15866 ms
I[15:12:20.117] --> reply:textDocument/hover(28) 15514 ms
I[15:12:32.997] <-- textDocument/didChange
I[15:12:32.997] <-- textDocument/semanticTokens/full(29)
I[15:12:32.998] <-- textDocument/inlayHint(30)
I[15:12:33.020] <-- textDocument/didChange
I[15:12:33.041] ASTWorker building file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/apptr069/event/tr069_event_trans_bootstrap.c version 5 with command
[/mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common]
/usr/lib/llvm-18/bin/clang-tool ...
I[15:12:33.096] ASTWorker building file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/include/cfapi/csp_tr069_adaptor.h version 4 with command
[/mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common]
/usr/lib/llvm-18/bin/clang-tool ...
I[15:12:33.240] --> textDocument/publishDiagnostics
I[15:12:33.353] <-- textDocument/hover(31)
I[15:12:33.629] Built preamble of size 296604 for file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/include/cfapi/csp_tr069_adaptor.h version 4 in 0.53 seconds
I[15:12:33.633] --> textDocument/publishDiagnostics
E[15:12:50.867] IncludeCleaner: Failed to get an entry for resolved path : No such file or directory
I[15:12:50.971] --> textDocument/publishDiagnostics
I[15:12:50.999] Built preamble of size 2440708 for file /mnt/remote/pdt/zx279128s_H3601PV94_ETB/095552/csp/component/tr069/tr069v2/common/core/apptr069/event/tr069_event_trans_bootstrap.c version 5 in 17.93 seconds
I[15:12:51.014] --> reply:textDocument/semanticTokens/full(29) 18016 ms
E[15:12:51.236] IncludeCleaner: Failed to get an entry for resolved path : No such file or directory
I[15:12:51.333] --> textDocument/publishDiagnostics
I[15:12:51.334] --> reply:textDocument/inlayHint(30) 18335 ms
E[15:12:51.334] IncludeCleaner: Failed to get an entry for resolved path : No such file or directory
I[15:12:51.334] --> reply:textDocument/hover(31) 17981 ms
I[15:12:51.520] <-- textDocument/hover(32)
E[15:12:51.521] IncludeCleaner: Failed to get an entry for resolved path : No such file or directory
I[15:12:51.522] --> reply:textDocument/hover(32) 1 ms
I[15:12:52.226] <-- textDocument/hover(33)
E[15:12:52.290] IncludeCleaner: Failed to get an entry for resolved path : No such file or directory
I[15:12:52.291] --> reply:textDocument/hover(33) 64 ms
I[15:13:17.623] <-- textDocument/hover(34)
E[15:13:17.707] IncludeCleaner: Failed to get an entry for resolved path : No such file or directory
I[15:13:17.707] --> reply:textDocument/hover(34) 83 ms
part of ycm conf:
set updatetime=300
let g:ycm_max_diagnostics_to_display = 50
19 "let g:ycm_global_ycm_extra_conf = '~/.vim/.ycm_extra_conf.py'
18 let g:ycm_confirm_extra_conf = 0
17 "let g:ycm_min_num_of_chars_for_completion = 0
16 let g:ycm_collect_identifiers_from_comments_and_strings = 1
15 let g:ycm_complete_in_comments = 1
14 "let g:ycm_collect_identifiers_from_tags_files = 1
13 "let g:ycm_seed_identifiers_with_syntax = 1
12 let g:ycm_enable_semantic_highlighting = 1
11 let g:ycm_enable_inlay_hints = 1
10 let g:ycm_clear_inlay_hints_in_insert_mode = 1
9 let g:ycm_error_symbol = '✗'
8 let g:ycm_warning_symbol = '⚠'
7 "let g:ycm_echo_current_diagnostic = 'virtual-text'
6 "see :h g:ycm_echo_current_diagnostic
5 "let g:ycm_update_diagnostics_in_insert_mode = 0
4 let g:ycm_show_detailed_diag_in_popup = 1
3 let g:ycm_always_populate_location_list = 1
2 let g:ycm_add_preview_to_completeopt = 1
1 let g:ycm_autoclose_preview_window_after_insertion = 1
clangd 19.1.0
the memory isn't a problem, i have 32GB RAM, and clangd only uses about 200m