Files
headscale/hscontrol
Jonas Schwartz f8018f177a policy/v2: skip via resolution when the policy has no via grants
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
2026-10-08 12:43:45 +02:00
..
2026-06-17 16:12:19 +02:00
2026-10-08 10:29:23 +02:00
2026-06-17 16:12:19 +02:00