User Details
- User Since
- Nov 22 2020, 2:16 AM (148 w, 2 d)
Nov 21 2022
Nov 17 2022
Well, multiple lenses occured due to https://github.com/lightmelodies/llvm-project/blob/codelens/clang-tools-extra/clangd/FindSymbols.cpp#L500
And can be fixed by https://github.com/lightmelodies/llvm-project/blob/codelens/clang-tools-extra/clangd/CodeLens.cpp#L69
Feb 18 2021
Better printing for C++ constructor and destructor. Remove unnecessary test cases.
Change behavior of template and add unit tests.
Feb 16 2021
Thanks for your response. Yes decl is too verbose in many cases. In fact I have tried another concise version, but I can not decide which one is better. Unit test in FindSymbolsTests.cpp is also done, but I would like upload them after we reach an agreement on what behavior is prefered.
Feb 15 2021
Nov 26 2020
I have also considered these problems, and here is some points of my view.
Latency
Consider llvm-project itself, textDocument/codeLens can be done in <500ms generally and <100ms if collect hierarchy is disabled in my notebook. Latency is significant in some rare case like Type.h which has too complex hierarchy relations. Meanwhile, vscode is smart to remember previous codelens's positions so the text rendering will not look too weird during long-time request. In fact, the biggest performance issue I find is that building AST when open a new file costs too much time, which makes textDocument/codeLens quite slow, as well as other action such as textDocument/documentSymbols. That's why I modified ClangdLSPServer.cpp to keep AST for recent closed files.
file | line count | cost | cost (without hierarchy) |
ASTVector.h | 411 | 4ms | 1ms |
APValue.h | 693 | 16 ms | 8ms |
Decl.h | 4599 | 213 ms | 40 ms |
Expr.h | 6383 | 447 ms | 61 ms |
Type.h | 7222 | 3765 ms | 47 ms |