From 7ed3ab8ab736dbf572fabdfbbfbaa722e8012f81 Mon Sep 17 00:00:00 2001 From: Isaac Levy Date: Thu, 10 Oct 2024 11:22:42 -0400 Subject: [PATCH] Restore lag comp quota behavior Lag comp quota is intended to build up each turn so that it can be used for spikes. The current code depletes quota on slow computers, and even for computers with cpu lag below .04s, quota builds too slowly to be able to be used for multiple spikes in a game. This patch is intended to be a short term fix, with a significant code and documentation overhaul planned in the near future. --- core/src/main/scala/LagTracker.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/scala/LagTracker.scala b/core/src/main/scala/LagTracker.scala index 6e9b61470..e6e4fcd99 100644 --- a/core/src/main/scala/LagTracker.scala +++ b/core/src/main/scala/LagTracker.scala @@ -62,7 +62,7 @@ final case class LagTracker( object LagTracker: - private val estimatedCpuLag = Centis(4) + private val estimatedCpuLag = Centis(14) // https://github.com/lichess-org/lila/issues/12097 private def maxQuotaGainFor(config: Clock.Config) =