Files
headscale/hscontrol
Jonas Schwartz 9d5ce0752f policy/v2: resolve via-route grants lazily
With a via grant in the policy, ViaRoutesForPeer still resolved every
grant's sources and destinations up front. Non-via grants are only read
once a via grant has matched the peer, which is rare (the peer must
advertise a covered route), and destinations only for grants whose
sources match the viewer. Resolve each grant on first use instead.

BenchmarkViaRoutesForPeer, mean per peer (Apple M3 Pro):

	policy     nodes  before    after
	via-mixed  100    9.5us     2.1us
	via-mixed  1000   69.0us    11.6us
	via        1000   8.1us     8.6us
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