[go: up one dir, main page]

Octez_connpool: Optimize connection pool warm-up

What

This commit optimizes the connection pool warm-up process by introducing a pre_heat function that establishes all connections concurrently.

Part of L2-152.

Why

The previous warm function established connections sequentially, which could be slow if the pool size is large. This change speeds up the application startup time by parallelizing the initial connection setup.

How

The new pre_heat function uses List.iter_p to concurrently request a connection from the pool for each available slot. This forces the Lwt_pool to establish all underlying connections in parallel. The original warm function, now renamed to re_warm, is called afterward to ensure all connections are ready.

Edited by Alain Mebsout

Merge request reports

Loading