[PATCH] D73949: [clangd] Debounce rebuilds responsively to rebuild times.

2020-02-23 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7d3f8b1e2dcd: [clangd] Debounce rebuilds responsively to 
rebuild times. (authored by sammccall).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73949/new/

https://reviews.llvm.org/D73949

Files:
  clang-tools-extra/clangd/ClangdServer.h


Index: clang-tools-extra/clangd/ClangdServer.h
===
--- clang-tools-extra/clangd/ClangdServer.h
+++ clang-tools-extra/clangd/ClangdServer.h
@@ -130,8 +130,11 @@
 llvm::Optional 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;
 


Index: clang-tools-extra/clangd/ClangdServer.h
===
--- clang-tools-extra/clangd/ClangdServer.h
+++ clang-tools-extra/clangd/ClangdServer.h
@@ -130,8 +130,11 @@
 llvm::Optional 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;
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D73949: [clangd] Debounce rebuilds responsively to rebuild times.

2020-02-04 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment.

{icon check-circle color=green} Unit tests: pass. 62438 tests passed, 0 failed 
and 845 were skipped.

{icon check-circle color=green} clang-tidy: pass.

{icon check-circle color=green} clang-format: pass.

Build artifacts 
: 
diff.json 
,
 clang-tidy.txt 
,
 clang-format.patch 
,
 CMakeCache.txt 
,
 console-log.txt 
,
 test-results.xml 


//Pre-merge checks is in beta. Report issue 
.
 Please join beta  or enable 
it for your project 
.//


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73949/new/

https://reviews.llvm.org/D73949



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D73949: [clangd] Debounce rebuilds responsively to rebuild times.

2020-02-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision.
sammccall added a reviewer: hokein.
Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, 
MaskRay, ilya-biryukov.
Herald added a project: clang.

Old: 500ms always. New: rebuild time, up to 500ms.

Fixes https://github.com/clangd/clangd/issues/275


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73949

Files:
  clang-tools-extra/clangd/ClangdServer.h


Index: clang-tools-extra/clangd/ClangdServer.h
===
--- clang-tools-extra/clangd/ClangdServer.h
+++ clang-tools-extra/clangd/ClangdServer.h
@@ -130,8 +130,11 @@
 llvm::Optional 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;
 


Index: clang-tools-extra/clangd/ClangdServer.h
===
--- clang-tools-extra/clangd/ClangdServer.h
+++ clang-tools-extra/clangd/ClangdServer.h
@@ -130,8 +130,11 @@
 llvm::Optional 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;
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits