[PATCH] D92201: [clangd] Make sure project-aware index is up-to-date for estimateMemoryUsage()

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 1 01:21:33 PST 2020


kadircet added a comment.

In D92201#2421520 <https://reviews.llvm.org/D92201#2421520>, @sammccall wrote:

> In D92201#2419933 <https://reviews.llvm.org/D92201#2419933>, @kbobyrev wrote:
>
>> I was trying to cause the index to load in the initialization stage for D92198 <https://reviews.llvm.org/D92198> but couldn't figure out where exactly the config is loaded and what could be the best place for triggering index loading.
>
> Fair point, will have a look at that. Forcing an index load might be a nice side-effect of this patch, but I think we can find a better way to do it.

I suppose the most natural place would be under `ClangdServer::addDocument`, but we don't have any nice way to trigger this warmup conceptually. All we can do is perform some other index operation that'll trigger index loading as a side-effect, which makes it quite weird to trigger in any "direct" place :/


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92201



More information about the cfe-commits mailing list