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

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 22 15:48:16 PST 2018


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 revision for something (or to unblock the queue)

In practice, this avoids the "first keystroke results in diagnostics" problem.
This is kind of awkward to test, and the test is pretty bad.
It can be observed nicely by capturing a trace, though.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D43648

Files:
  clangd/TUScheduler.cpp
  clangd/TUScheduler.h
  unittests/clangd/TUSchedulerTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43648.135535.patch
Type: text/x-patch
Size: 10735 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180222/23b4f755/attachment-0001.bin>


More information about the cfe-commits mailing list