[PATCH] D93873: [clangd] Cache preambles of closed files

Quentin Chateau via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 28 13:51:23 PST 2020


qchateau created this revision.
qchateau added a reviewer: sammccall.
Herald added subscribers: usaxena95, kadircet, arphaman, javed.absar.
qchateau requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang.

When a file is closed, push its preamble to a LRU cache
When a file is opened, try to get the preamble from the LRU cache.

By default store 10 preambles if they are stored on
memory and 1000 if they are stored on disk. That value
can be modified with --keep-preambles=N


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93873

Files:
  clang-tools-extra/clangd/ClangdServer.cpp
  clang-tools-extra/clangd/ClangdServer.h
  clang-tools-extra/clangd/TUScheduler.cpp
  clang-tools-extra/clangd/TUScheduler.h
  clang-tools-extra/clangd/tool/ClangdMain.cpp
  clang-tools-extra/clangd/unittests/ClangdTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93873.313895.patch
Type: text/x-patch
Size: 14782 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201228/09a79748/attachment.bin>


More information about the cfe-commits mailing list