llvm-project/clang-tools-extra/clangd
Sam McCall 92570718a8 [clangd] Mechanism to make update debounce responsive to rebuild speed.
Summary:
Currently we delay AST rebuilds by 500ms after each edit, to wait for
further edits. This is a win if a rebuild takes 5s, and a loss if it
takes 50ms.

This patch sets debouncepolicy = clamp(min, ratio * rebuild_time, max).
However it sets min = max = 500ms so there's no policy change or actual
customizability - will do that in a separate patch.

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

Reviewers: hokein

Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D73873
2020-02-04 12:28:20 +01:00
..
benchmarks Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
clients/clangd-vscode [clangd] Bump vscode-clangd v0.0.20 2020-01-30 11:45:54 +01:00
fuzzer [clang-tools-extra] [cmake] Link against libclang-cpp whenever possible 2019-10-04 20:30:02 +00:00
include-mapping [clangd] Add include-mapping for C symbols. 2019-06-21 13:32:18 +00:00
index Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
indexer Revert "Use InitLLVM to setup a pretty stack printer" 2019-11-25 21:06:56 -05:00
refactor [clangd] Add a symbol-name-based blacklist for rename. 2020-01-29 10:32:40 +01:00
test [clangd] Replace raw lexer code with token buffer in prepare rename. 2020-01-29 12:57:18 +01:00
tool Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
unittests [clangd] Mechanism to make update debounce responsive to rebuild speed. 2020-02-04 12:28:20 +01:00
xpc Fix clangd-xpc-test-client build after 777180a32b 2020-01-28 19:48:31 -05:00
AST.cpp [clangd] Replace shortenNamespace with getQualification 2020-01-03 09:05:30 +01:00
AST.h NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
CMakeLists.txt [clangd] Add path mappings functionality 2020-01-07 12:40:51 +01:00
CSymbolMap.inc [clangd] Add include-mapping for C symbols. 2019-06-21 13:32:18 +00:00
Cancellation.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Cancellation.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangdLSPServer.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
ClangdLSPServer.h [clangd] Only re-open files if their flags changed 2020-01-27 10:58:20 -05:00
ClangdServer.cpp [clangd] Mechanism to make update debounce responsive to rebuild speed. 2020-02-04 12:28:20 +01:00
ClangdServer.h [clangd] Mechanism to make update debounce responsive to rebuild speed. 2020-02-04 12:28:20 +01:00
CodeComplete.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CodeComplete.h Fix trivial typos in comments; NFC 2020-01-02 13:41:43 -05:00
CodeCompletionStrings.cpp Code completion should not ignore default parameters in functions. 2019-08-07 16:52:21 +00:00
CodeCompletionStrings.h [clangd] Place cursor better after completing patterns 2019-05-28 15:33:37 +00:00
CollectMacros.h [clangd] Inactive regions support as an extension to semantic highlighting 2019-11-21 19:40:55 -05:00
CompileCommands.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CompileCommands.h [clangd] Try to fix CompileCommandsTests on windows. NFC 2019-12-06 12:28:01 +01:00
Compiler.cpp [clangd] Log cc1 args at verbose level. 2019-11-29 11:00:01 +01:00
Compiler.h [clangd] Log cc1 args at verbose level. 2019-11-29 11:00:01 +01:00
Context.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Context.h NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
Diagnostics.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Diagnostics.h [NFC] Fix typos in Clangd and Clang 2019-12-16 10:54:40 +01:00
DraftStore.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
DraftStore.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ExpectedTypes.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
ExpectedTypes.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FS.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
FS.h [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase 2019-07-18 16:13:23 +00:00
FSProvider.cpp [clangd] Don't mmap source files on all platforms --> don't crash on git checkout 2020-01-29 19:44:14 +01:00
FSProvider.h [clangd] Don't mmap source files on all platforms --> don't crash on git checkout 2020-01-29 19:44:14 +01:00
Features.inc.in [clangd] XPC transport layer 2019-01-16 00:24:22 +00:00
FileDistance.cpp [clangd] Save an unnecessary copy, NFC. 2019-09-24 13:25:38 +00:00
FileDistance.h Move endian constant from Host.h to SwapByteOrder.h, prune include 2019-10-19 00:48:11 +00:00
FindSymbols.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
FindSymbols.h [clangd] Type hierarchy subtypes 2019-06-16 02:31:37 +00:00
FindTarget.cpp [clangd] Fix null check in FindTarget. 2020-01-29 02:01:42 +01:00
FindTarget.h [clangd] targetDecl() returns only NamedDecls. 2020-01-03 18:18:40 +01:00
Format.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Format.h [clangd] Revamp textDocument/onTypeFormatting. 2019-06-10 14:26:21 +00:00
FormattedString.cpp [clangd] Add a ruler after header in hover 2020-01-15 15:54:38 +01:00
FormattedString.h [clangd] Add a ruler after header in hover 2020-01-15 15:54:38 +01:00
Function.h [clangd] Remove Bind, use C++14 lambda captures instead. NFC 2019-08-16 09:20:01 +00:00
FuzzyMatch.cpp [clangd] Tune the fuzzy-matching algorithm 2019-03-15 14:00:49 +00:00
FuzzyMatch.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GlobalCompilationDatabase.cpp [clangd] Log directory when a CDB is loaded 2020-01-30 12:15:04 +01:00
GlobalCompilationDatabase.h [clangd] (take 2) Try harder to find a plausible `clang` as argv0, particularly on Mac. 2019-12-06 09:47:03 +01:00
HeaderSourceSwitch.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
HeaderSourceSwitch.h [clangd] Implement a smart version of HeaderSource switch. 2019-09-30 10:48:02 +00:00
Headers.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Headers.h [clangd][NFC] Typo in comment 2019-07-30 20:39:39 +00:00
Hover.cpp [clangd][Hover] Handle uninstantiated default args 2020-01-31 15:03:33 +01:00
Hover.h [clangd] Introduce paragraph, the first part of new rendering structs 2019-12-13 09:58:55 +01:00
IncludeFixer.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
IncludeFixer.h [clangd] Compute scopes eagerly in IncludeFixer 2019-08-06 11:37:50 +00:00
JSONTransport.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Logger.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Logger.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ParsedAST.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
ParsedAST.h NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
Path.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PathMapping.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
PathMapping.h [clangd] Add path mappings functionality 2020-01-07 12:40:51 +01:00
Preamble.cpp [clangd] Improve long and confusing preamble log message. 2019-11-16 17:13:02 +01:00
Preamble.h [clangd] Collect macros in the preamble region of the main file 2019-09-24 11:14:06 +00:00
Protocol.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Protocol.h [clangd] Show background index status using LSP 3.15 work-done progress notifications 2020-01-24 12:21:08 +01:00
Quality.cpp [clangd] cleanup: unify the implemenation of checking a location is inside main file. 2019-07-19 08:33:39 +00:00
Quality.h [clangd] Remove unused signature help quality signal. NFC 2019-06-06 08:32:25 +00:00
QueryDriverDatabase.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
RIFF.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RIFF.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Selection.cpp [clangd] Improve ObjC property handling in SelectionTree. 2020-01-28 11:07:19 +01:00
Selection.h Revert "[clangd] Reapply b60896fad9 Fall back to selecting token-before-cursor if token-after-cursor fails." 2019-12-16 19:07:49 +01:00
SemanticHighlighting.cpp [clangd] Add C++20 concepts support to findExplicitReferences() and semantic highlighting 2020-01-23 15:11:46 -05:00
SemanticHighlighting.h [clangd] Add C++20 concepts support to findExplicitReferences() and semantic highlighting 2020-01-23 15:11:46 -05:00
SemanticSelection.cpp Revert "[clangd] Reapply b60896fad9 Fall back to selecting token-before-cursor if token-after-cursor fails." 2019-12-16 19:07:49 +01:00
SemanticSelection.h Implement semantic selections. 2019-09-16 11:29:35 +00:00
Shutdown.cpp Include <cstdlib> for std::abort() in clangd 2020-01-24 20:52:37 +01:00
Shutdown.h [clangd] Shutdown cleanly on signals. 2019-11-27 12:38:49 +01:00
SourceCode.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
SourceCode.h [clangd] Simplify code using findName. NFC 2019-12-10 10:22:43 +01:00
StdSymbolMap.inc [clangd] Add include-mapping for C symbols. 2019-06-21 13:32:18 +00:00
TUScheduler.cpp [clangd] Mechanism to make update debounce responsive to rebuild speed. 2020-02-04 12:28:20 +01:00
TUScheduler.h [clangd] Mechanism to make update debounce responsive to rebuild speed. 2020-02-04 12:28:20 +01:00
Threading.cpp [clangd] Make Notification a little safer. 2020-01-25 15:31:55 +01:00
Threading.h [clangd] Remove obsolete includes. NFC 2019-09-04 10:01:05 +00:00
Trace.cpp [clangd] Remove obsolete includes. NFC 2019-09-04 10:01:05 +00:00
Trace.h NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
Transport.h [NFC] Fix typos in Clangd and Clang 2019-12-16 10:54:40 +01:00
URI.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
URI.h [clangd] Simplify the callside of URI::resolve, NFC. 2019-09-23 14:39:37 +00:00
XRefs.cpp [clangd] Make go-to-def jumps to overriden methods on `final` specifier. 2020-01-30 12:49:30 +01:00
XRefs.h Revert "Revert "[clangd] Implement "textDocument/documentLink" protocol support"" 2020-01-02 16:36:21 +01:00