[PATCH] D43648: [clangd] Debounce streams of updates.

2018-03-02 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326546: [clangd] Debounce streams of updates. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D43648 Files: clang-tools-

[PATCH] D43648: [clangd] Debounce streams of updates.

2018-02-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D43648: [clangd] Debounce streams of updates.

2018-02-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 136045. sammccall marked an inline comment as done. sammccall added a comment. review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43648 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h cl

[PATCH] D43648: [clangd] Debounce streams of updates.

2018-02-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 4 inline comments as done. sammccall added a comment. Thanks for catching all those things! Comment at: unittests/clangd/TUSchedulerTests.cpp:127 + /*ASTParsedCallback=*/nullptr, + /*UpdateDebounce=*/std::chrono::milliseconds(5

[PATCH] D43648: [clangd] Debounce streams of updates.

2018-02-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/TUScheduler.h:56 + std::chrono::steady_clock::duration UpdateDebounce = + std::chrono::milliseconds(500)); ~TUScheduler(); Maybe we could remove this default argument now tha

[PATCH] D43648: [clangd] Debounce streams of updates.

2018-02-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 135661. sammccall added a comment. rebase Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43648 Files: clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/TUScheduler.cpp clangd/TUScheduler.h clangd/Threading.cpp clangd/Thread

[PATCH] D43648: [clangd] Debounce streams of updates.

2018-02-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 135660. sammccall marked 3 inline comments as done. sammccall added a comment. Make Deadline a real type with 0/finite/inf semantics. Pull out another wait() overload. Expose debounce delay option in clangdserver. Repository: rCTE Clang Tools Extra http

[PATCH] D43648: [clangd] Debounce streams of updates.

2018-02-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/TUScheduler.cpp:324 +if (*Deadline) + RequestsCV.wait_until(Lock, **Deadline); +else ilya-biryukov wrote: > It looks like if we unwrap `Optional` to `Deadline`, we could > replace this

[PATCH] D43648: [clangd] Debounce streams of updates.

2018-02-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/TUScheduler.cpp:140 + // Time to wait after an update to see whether another update obsoletes it. + steady_clock::duration UpdateDebounce; }; Maybe make it `const` and put beside `RunSync`? Both are sched

[PATCH] D43648: [clangd] Debounce streams of updates.

2018-02-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, ioeric, jkorous-apple, klimek. Don't actually start building ASTs for new revisions until either: - 500ms have passed since the last revision, or - we actually need the revisi