[PATCH] D73873: [clangd] Mechanism to make update debounce responsive to rebuild speed.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 3 04:10:16 PST 2020


sammccall created this revision.
sammccall added a reviewer: hokein.
Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov.
Herald added a project: clang.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73873

Files:
  clang-tools-extra/clangd/ClangdServer.cpp
  clang-tools-extra/clangd/ClangdServer.h
  clang-tools-extra/clangd/TUScheduler.cpp
  clang-tools-extra/clangd/TUScheduler.h
  clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73873.242016.patch
Type: text/x-patch
Size: 10842 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200203/30b14b07/attachment-0001.bin>


More information about the cfe-commits mailing list