You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf: stop blocking startup for 10s on two DNS lookups that always fail
get_cors_origins() resolved the machine's own hostname to discover LAN IPs for the
dev CORS allowlist. On macOS the hostname is `*.local` and does not resolve, so
gethostbyname and getaddrinfo each burned a full ~5s resolver timeout and returned
nothing -- on every backend start and every test run.
The LAN IP was in fact always supplied by the default-route probe, which consults the
routing table and takes 1ms. Keep the hostname lookup for hosts where it does resolve,
but run it on a daemon thread with a 0.5s budget instead of waiting on the resolver.
Startup: 10.8s -> 1.2s. Test suite: 13.2s -> 3.6s. CORS origins unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments