[all-commits] [llvm/llvm-project] c46863: [clangd] Speed up a slow sleeping testcase.
Sam McCall via All-commits
all-commits at lists.llvm.org
Fri May 6 11:14:50 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c468635b7dfcec302f7688f5dcde91913524e355
https://github.com/llvm/llvm-project/commit/c468635b7dfcec302f7688f5dcde91913524e355
Author: Sam McCall <sam.mccall at gmail.com>
Date: 2022-05-06 (Fri, 06 May 2022)
Changed paths:
M clang-tools-extra/clangd/support/Threading.cpp
M clang-tools-extra/clangd/support/Threading.h
M clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
Log Message:
-----------
[clangd] Speed up a slow sleeping testcase.
This testcase runs slowly due to 3.2s of sleeps = 2 + 1 + 0.2s.
After this patch it has 0.55s only.
Reduced by:
- observed that the last test was bogus: we were sleeping until the queue was
idle, effectively just a second copy of the first test. This avoids 1s sleep.
- when waiting for debounce, sleep only until test passes, not for enough
time to be safe (in practice was 2x debounce time, now 1x debounce time)
- scaling delays down by a factor of 2 (note: factor of 10 caused bot failures)
Differential Revision: https://reviews.llvm.org/D125103
More information about the All-commits
mailing list