[PATCH] D39843: [clangd] Use in-memory preambles in clangd.

2017-11-16 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318412: [clangd] Use in-memory preambles in clangd. (authored by ibiryukov). Repository: rL LLVM https://reviews.llvm.org/D39843 Files: clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp

[PATCH] D39843: [clangd] Use in-memory preambles in clangd.

2017-11-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 123035. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - Removed /*ref*/. - Changed the command-line flag: it's -pch-storage now instead of -in-memory-pchs. - Actually pass the StoreInMemory flag to

[PATCH] D39843: [clangd] Use in-memory preambles in clangd.

2017-11-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdUnit.cpp:238 if (Preamble) { -Preamble->AddImplicitPreamble(*CI, Buffer.get()); +Preamble->AddImplicitPreamble(*CI, /*ref*/ VFS, Buffer.get()); } else { sammccall wrote: > ref is still

[PATCH] D39843: [clangd] Use in-memory preambles in clangd.

2017-11-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. As discussed, we should probably bundle together some related options into structs to make plumbing easier. Not a blocker here though. If these options are pure-data, I think it's OK if

[PATCH] D39843: [clangd] Use in-memory preambles in clangd.

2017-11-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D39843#920568, @sammccall wrote: > As a very first step, can we make this configurable but off-by-default? That > will address the pressing diskless-servers need. I think on-disk by default makes sense now until we do the measurements

[PATCH] D39843: [clangd] Use in-memory preambles in clangd.

2017-11-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 122845. ilya-biryukov added a comment. Made in-memory preambles optional (on-disk by default). https://reviews.llvm.org/D39843 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/ClangdServer.h

[PATCH] D39843: [clangd] Use in-memory preambles in clangd.

2017-11-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Heh, I was just going to ask :-) As a very first step, can we make this configurable but off-by-default? That will address the pressing diskless-servers need. In a typical workstation scenario, disk is plentiful (if slow) and RAM is scarce - very likely we're

[PATCH] D39843: [clangd] Use in-memory preambles in clangd.

2017-11-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. After looking at the numbers, I think we should make this configurable. I'll update this change accordingly. Not sure what should be the default, though. I'm currently erring on the side of "in-memory by default". Current implementation eats almost twice as much

[PATCH] D39843: [clangd] Use in-memory preambles in clangd.

2017-11-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. https://reviews.llvm.org/D39843 Files: clangd/ClangdUnit.cpp Index: clangd/ClangdUnit.cpp === --- clangd/ClangdUnit.cpp +++ clangd/ClangdUnit.cpp @@ -235,7 +235,7 @@ // NOTE: we use