Latency check: ping in parallel and dedupe shared IPs #205

Open
opened 2026-08-29 13:13:40 -04:00 by mysticalsoap · 0 comments
Owner

LatencyCheck (latency.py) runs one ping -c 1 -W 1 subprocess per catalog entry, sequentially. Every unreachable server costs a full second, so a populated catalog takes minutes to settle - and it runs at startup, after every import, and on every network change.

Two independent fixes, one feature:

  • Parallelize: ~30 pings in flight (thread pool or asyncio subprocesses, no new dependency) turns minutes into seconds.
  • Dedupe by IP: entries sharing an address are pinged once each today. The ProtonVPN WireGuard siblings (#196) doubled that provider's ping count for zero information - each rides the same EntryIP as its OpenVPN twin. Ping unique IPs, fan the result out to every entry sharing one.

Worth keeping: the previous-fastest-first ordering (sort_by_latency), so the visible top of the list settles first while the long tail fills in.

LatencyCheck (latency.py) runs one `ping -c 1 -W 1` subprocess per catalog entry, sequentially. Every unreachable server costs a full second, so a populated catalog takes minutes to settle - and it runs at startup, after every import, and on every network change. Two independent fixes, one feature: - **Parallelize**: ~30 pings in flight (thread pool or asyncio subprocesses, no new dependency) turns minutes into seconds. - **Dedupe by IP**: entries sharing an address are pinged once each today. The ProtonVPN WireGuard siblings (#196) doubled that provider's ping count for zero information - each rides the same EntryIP as its OpenVPN twin. Ping unique IPs, fan the result out to every entry sharing one. Worth keeping: the previous-fastest-first ordering (sort_by_latency), so the visible top of the list settles first while the long tail fills in.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mysticalsoap/aqomui#205
No description provided.