[PATCH] D93873: [clangd] Cache preambles of closed files
Quentin Chateau via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 11 10:20:16 PST 2021
qchateau added a comment.
Hey, don't worry about the delay, I won't have as much time on my hands anymore anyway.
- we can definitely make this opt-in
- MB instead of # is an idea, it's probably closer to what the user want to configure - if he does - but it would also probably give a worse default value. Your call !
- I mean why not, but this diff was more about bringing the feature in than making it perfect. The heuristic to decide how to evict preambles can be made very complicated if we want to optimize it
- we can do as you suggest, it related to the previous point
- Ah ! What would you recommend ? No forget it, I'll just make it opt-it for now
I've also tried to keep the ASTWorkers alive in a different branch. The result is very different: ASTWorkers always use RAM so we can't keep as many, but keeping them alive makes is even better (15s with no cache, 2s with preamble cache, virtually 0s with ASTWorker cache). I'd say both features are nice but they give different results for a different cost.
Also it would be great to stop the ASTWorker threads when they are just in cache, but the class needs a rework to be able to stop/restart it
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93873/new/
https://reviews.llvm.org/D93873
More information about the cfe-commits
mailing list