From bab4d5d58f070483a2b178a6dcb9d7c3ddae05a3 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Thu, 25 Nov 2021 10:25:33 +0000 Subject: [PATCH] Extend AUTO_COMPILE_DEBOUNCE to allow for increased SINGLE_USER_FLUSH_DELAY (#5883) GitOrigin-RevId: f65113b2dea901fb757dafb08acc32c770960bf2 --- .../web/frontend/js/features/pdf-preview/util/compiler.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/frontend/js/features/pdf-preview/util/compiler.js b/services/web/frontend/js/features/pdf-preview/util/compiler.js index 1a0cd5668e..cc82aee873 100644 --- a/services/web/frontend/js/features/pdf-preview/util/compiler.js +++ b/services/web/frontend/js/features/pdf-preview/util/compiler.js @@ -6,11 +6,11 @@ import { debounce } from 'lodash' import { trackPdfDownload } from '../../../ide/pdf/controllers/PdfJsMetrics' const AUTO_COMPILE_MAX_WAIT = 5000 -// We add a 1 second debounce to sending user changes to server if they aren't -// collaborating with anyone. This needs to be higher than that, and allow for +// We add a 2 second debounce to sending user changes to server if they aren't +// collaborating with anyone. This needs to be higher than SINGLE_USER_FLUSH_DELAY, and allow for // client to server latency, otherwise we compile before the op reaches the server // and then again on ack. -const AUTO_COMPILE_DEBOUNCE = 2000 +const AUTO_COMPILE_DEBOUNCE = 2500 const searchParams = new URLSearchParams(window.location.search)