mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-10 16:50:07 +09:00
f8018f177a
ViaRoutesForPeer runs for every peer of every map response. Before it looks at Via, it converts every ACL to grants and resolves each grant's sources and destinations against the whole node set. Only via grants can add to the result and ACLs never carry via, so without a via grant all of that work was discarded. On large tailnets it dominated map generation. Return early instead. BenchmarkViaRoutesForPeer, mean per peer (Apple M3 Pro): policy nodes before after global 1000 21.8us 9ns, 0 allocs self 1000 45.0us 9ns, 0 allocs via 1000 8.1us unchanged via-mixed 1000 69.0us unchanged Fixes #3512