Skip to content

Commit

Permalink
Restore lag comp quota behavior
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
isaacl committed Oct 10, 2024
1 parent ea0fc5c commit 7ed3ab8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/LagTracker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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) =
Expand Down

0 comments on commit 7ed3ab8

Please sign in to comment.