[PATCH] D47063: [clangd] Keep only a limited number of idle ASTs in memory
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 18 06:57:16 PDT 2018
ilya-biryukov created this revision.
ilya-biryukov added a reviewer: sammccall.
Herald added subscribers: jkorous, MaskRay, ioeric, javed.absar, klimek.
After this commit, clangd will only keep the last 3 accessed ASTs in
memory. Preambles for each of the opened files are still kept in
memory to make completion and AST rebuilds fast.
AST rebuilds are usually fast enough, but having the last ASTs in
memory still considerably improves latency of operations like
findDefinition and documeneHighlight, which are often sent multiple
times a second when moving around the code. So keeping some of the last
accessed ASTs in memory seems like a reasonable tradeoff.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47063
Files:
clangd/ClangdUnit.cpp
clangd/ClangdUnit.h
clangd/TUScheduler.cpp
clangd/TUScheduler.h
test/clangd/trace.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47063.147498.patch
Type: text/x-patch
Size: 31627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180518/abb7ff61/attachment-0001.bin>
More information about the cfe-commits
mailing list