From 75614b879a6cdf5e70d5b0d5fdedd5b9cf1c2986 Mon Sep 17 00:00:00 2001 From: Tatiana Elfimova Date: Mon, 18 Aug 2025 16:52:09 +0200 Subject: [PATCH] IJPL-195953 Search Everywhere for RD: use SE timeout advanced setting GitOrigin-RevId: e6ba9b2b7fabf356a8d43e7ddc4c4e44358bc69e --- platform/searchEverywhere/frontend/src/vm/SeTabVm.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/searchEverywhere/frontend/src/vm/SeTabVm.kt b/platform/searchEverywhere/frontend/src/vm/SeTabVm.kt index 7d86829cf029..491c8ece0b84 100644 --- a/platform/searchEverywhere/frontend/src/vm/SeTabVm.kt +++ b/platform/searchEverywhere/frontend/src/vm/SeTabVm.kt @@ -190,18 +190,18 @@ class SeTabVm( } } -private const val ESSENTIALS_WAITING_TIMEOUT: Long = 2000 private const val ESSENTIALS_THROTTLE_DELAY: Long = 100 private const val ESSENTIALS_ENOUGH_COUNT: Int = 15 private const val FAST_PASS_THROTTLE: Long = 100 private fun Flow.throttleUntilEssentialsArrive(essentialProviderIds: Set): Flow> { val essentialProvidersCounts = essentialProviderIds.associateWith { 0 }.toMutableMap() + val essentialWaitingTimeout: Long = AdvancedSettings.getInt("search.everywhere.contributors.wait.timeout").toLong() SeLog.log(SeLog.THROTTLING) { "Will start throttle with essential providers: $essentialProviderIds"} return throttledWithAccumulation( - resultThrottlingMs = ESSENTIALS_WAITING_TIMEOUT, + resultThrottlingMs = essentialWaitingTimeout, shouldPassItem = { it !is SeResultEndEvent }, fastPassThrottlingMs = FAST_PASS_THROTTLE, shouldFastPassItem = { it.providerId().shouldIgnoreThrottling() }