Files
momentum-system/alpaca_paper
momentum devandClaude Opus 4.8 dd16a520f0 Process-wide DNS cache — the root fix for the slow loop
The 2.5s value-cache + fewer calls only halved the slowness; the real cause was
flaky WSL DNS (~5s on ~1 in 5 resolves) and urllib re-resolving on EVERY
request. Cache successful DNS lookups process-wide (5min TTL) so each Alpaca
host is resolved at most once per window. Measured: get_orders went from
intermittent 5s spikes to a steady ~200ms. Opt out via ALPACA_DNS_CACHE=0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 15:27:23 -04:00
..