[all-commits] [llvm/llvm-project] 925707: [clangd] Mechanism to make update debounce respons...

Sam McCall via All-commits all-commits at lists.llvm.org
Tue Feb 4 03:37:30 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 92570718a86cc4c23108b596002114ab25857b14
      https://github.com/llvm/llvm-project/commit/92570718a86cc4c23108b596002114ab25857b14
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2020-02-04 (Tue, 04 Feb 2020)

  Changed paths:
    M clang-tools-extra/clangd/ClangdServer.cpp
    M clang-tools-extra/clangd/ClangdServer.h
    M clang-tools-extra/clangd/TUScheduler.cpp
    M clang-tools-extra/clangd/TUScheduler.h
    M clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list