[clang-tools-extra] 7d3f8b1 - [clangd] Debounce rebuilds responsively to rebuild times.
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 23 06:45:01 PST 2020
Author: Sam McCall
Date: 2020-02-23T15:34:28+01:00
New Revision: 7d3f8b1e2dcda99b245a9e3a254090aa1b5cfd66
URL: https://github.com/llvm/llvm-project/commit/7d3f8b1e2dcda99b245a9e3a254090aa1b5cfd66
DIFF: https://github.com/llvm/llvm-project/commit/7d3f8b1e2dcda99b245a9e3a254090aa1b5cfd66.diff
LOG: [clangd] Debounce rebuilds responsively to rebuild times.
Summary:
Old: 500ms always. New: rebuild time, up to 500ms.
Fixes https://github.com/clangd/clangd/issues/275
Reviewers: hokein
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73949
Added:
Modified:
clang-tools-extra/clangd/ClangdServer.h
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/ClangdServer.h b/clang-tools-extra/clangd/ClangdServer.h
index 5156520e2d07..5964680ccf6f 100644
--- a/clang-tools-extra/clangd/ClangdServer.h
+++ b/clang-tools-extra/clangd/ClangdServer.h
@@ -130,8 +130,11 @@ class ClangdServer {
llvm::Optional<std::string> ResourceDir = llvm::None;
/// Time to wait after a new file version before computing diagnostics.
- DebouncePolicy UpdateDebounce =
- DebouncePolicy::fixed(std::chrono::milliseconds(500));
+ DebouncePolicy UpdateDebounce = DebouncePolicy{
+ /*Min=*/std::chrono::milliseconds(50),
+ /*Max=*/std::chrono::milliseconds(500),
+ /*RebuildRatio=*/1,
+ };
bool SuggestMissingIncludes = false;
More information about the cfe-commits
mailing list