From 15a49d8bee146d36499c3c55f1944f607fcf3b7a Mon Sep 17 00:00:00 2001 From: Emma Jamieson-Hoare Date: Fri, 17 Apr 2026 15:56:18 +0100 Subject: [PATCH] perf(re-execute): relax executor reset thresholds Increase state cache size limit from 1M to 5M entries and executor lifetime from 120s to 600s. Preserves hot state caches longer during re-execute, reducing redundant DB lookups for frequently accessed accounts and storage slots. Amp-Thread-ID: https://ampcode.com/threads/T-019d9b2e-e5ea-75ef-ac3d-106a3a28c17a Co-authored-by: Amp --- crates/cli/commands/src/re_execute.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/cli/commands/src/re_execute.rs b/crates/cli/commands/src/re_execute.rs index a4527ae3b40..4dd843e6060 100644 --- a/crates/cli/commands/src/re_execute.rs +++ b/crates/cli/commands/src/re_execute.rs @@ -138,7 +138,7 @@ impl let cancellation = cancellation.clone(); let next_block = Arc::clone(&next_block); tasks.spawn_blocking(move || { - let executor_lifetime = Duration::from_secs(120); + let executor_lifetime = Duration::from_secs(600); loop { if cancellation.is_cancelled() { @@ -245,7 +245,7 @@ impl let _ = stats_tx.send(block.gas_used()); // Reset DB once in a while to avoid OOM or read tx timeouts - if executor.size_hint() > 1_000_000 || + if executor.size_hint() > 5_000_000 || executor_created.elapsed() > executor_lifetime { executor =