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() }