[PATCH] D148088: [RFC][clangd] Move preamble index task to a seperate task

Kugan Vivekanandarajah via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 3 04:03:45 PDT 2023


kuganv added a comment.

Thanks @kadircet , @sammccall and @ilya-biryukov for the super detailed explanation. As mentioned, we will test clangd with an ASAN build to test.

I also would like to get your feedback on the implementation.  After we claim the AST as per @sammccall's patch into LiveAST, we seem to have at least two options for delayed indexing.

Option 1:

- Change onPreambleAST to get LiveAST to pass it to PreambleThread
- In PreambleThread::build, as part of the scope exit

  if (!ReusedPreamble)
     // Index Preamble

Option 2:

- Change onPreambleAST to get LiveAST as value
- Start an Indexing thread
- TUScheduler can manage another thread for indexing similar to how it does preamble and AST thread.

Have you had any thoughts about this. Thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148088/new/

https://reviews.llvm.org/D148088



More information about the cfe-commits mailing list