From c8ed2c02987e422c5439bd7e50fa0cea0d8a5183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksa=20Siri=C5=A1ki?= <31509435+aleksasiriski@users.noreply.github.com> Date: Fri, 10 May 2024 16:51:19 +0200 Subject: [PATCH] fix(timeouts): more sensible defaults (faster overall) --- src/config/defaults.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/config/defaults.go b/src/config/defaults.go index 92ccc7f7..ffa6a06a 100644 --- a/src/config/defaults.go +++ b/src/config/defaults.go @@ -178,10 +178,10 @@ func New() Config { Ranking: NewRanking(), Timings: Timings{ PreferredTimeout: 1 * time.Second, - PreferredTimeoutResults: 30, + PreferredTimeoutResults: 20, AdditionalTimeout: 50 * time.Millisecond, - HardTimeout: 3 * time.Second, - Timeout: 3 * time.Second, + HardTimeout: 1500 * time.Millisecond, + Timeout: 1500 * time.Millisecond, PageTimeout: 1 * time.Second, }, }, @@ -192,8 +192,8 @@ func New() Config { PreferredTimeout: 1 * time.Second, PreferredTimeoutResults: 40, AdditionalTimeout: 100 * time.Millisecond, - HardTimeout: 2 * time.Second, - Timeout: 2 * time.Second, + HardTimeout: 1500 * time.Millisecond, + Timeout: 1500 * time.Millisecond, PageTimeout: 1 * time.Second, }, }, @@ -201,11 +201,11 @@ func New() Config { Engines: NewInfo(), Ranking: NewRanking(), Timings: Timings{ - PreferredTimeout: 1 * time.Second, - PreferredTimeoutResults: 20, - AdditionalTimeout: 50 * time.Millisecond, - HardTimeout: 2 * time.Second, - Timeout: 2 * time.Second, + PreferredTimeout: 500 * time.Millisecond, + PreferredTimeoutResults: 10, + AdditionalTimeout: 25 * time.Millisecond, + HardTimeout: 1200 * time.Millisecond, + Timeout: 1200 * time.Millisecond, PageTimeout: 1 * time.Second, }, }, @@ -213,11 +213,11 @@ func New() Config { Engines: NewScience(), Ranking: NewRanking(), Timings: Timings{ - PreferredTimeout: 2 * time.Second, - PreferredTimeoutResults: 40, - AdditionalTimeout: 200 * time.Millisecond, - HardTimeout: 5 * time.Second, - Timeout: 5 * time.Second, + PreferredTimeout: 1 * time.Second, + PreferredTimeoutResults: 10, + AdditionalTimeout: 100 * time.Millisecond, + HardTimeout: 3 * time.Second, + Timeout: 3 * time.Second, PageTimeout: 1 * time.Second, }, }, @@ -227,7 +227,7 @@ func New() Config { Timings: Timings{ PreferredTimeout: 2 * time.Second, PreferredTimeoutResults: 60, - AdditionalTimeout: 100 * time.Millisecond, + AdditionalTimeout: 200 * time.Millisecond, HardTimeout: 4 * time.Second, Timeout: 4 * time.Second, PageTimeout: 1 * time.Second,