Skip to content

fix(perf): precompile health regexes, share HTTP client, cut hot-path clones - #676

Merged
iamquang95 merged 1 commit into
mainfrom
feat/fix-645
Aug 31, 2026
Merged

fix(perf): precompile health regexes, share HTTP client, cut hot-path clones#676
iamquang95 merged 1 commit into
mainfrom
feat/fix-645

Conversation

@iamquang95

Copy link
Copy Markdown
Collaborator

Fix #645

  • app/health — a regex was compiled per metric series per check tick; now compiled once into a static.
  • cli/test — a new reqwest::Client per probe meant each RTT measurement included its own TCP/TLS handshake; now one shared client.
  • coreDutyType::Display round-tripped through serde_json on every call; now a direct as_str().
  • parsigexdo_recv deep-cloned a ParSignedData (a whole beacon block for proposals) per entry per message; now borrowed.
  • p2p — swapped an allocating .is_empty() check for the existing has_connection.

Behaviour change: request_rtt and relay_ping_test had no request timeout; they now use the 10s one beacon.rs/mev.rs already applied. Sharing a client also means concurrent probes to one host multiplex over a single HTTP/2 connection — only visible in beacon_ping_load_test.

@iamquang95 iamquang95 changed the title perf: precompile health regexes, share HTTP client, cut hot-path clones fix(perf): precompile health regexes, share HTTP client, cut hot-path clones Aug 28, 2026
@iamquang95
iamquang95 merged commit 271e2d7 into main Aug 31, 2026
16 of 17 checks passed
@iamquang95
iamquang95 deleted the feat/fix-645 branch August 31, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minor performance improvements

2 participants