mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-03 13:59:18 -05:00
wgengine/userspace: reduce allocations in getStatus
Two optimizations. Use values instead of pointers. We were using pointers to make track the "peer in progress" easier. It's not too hard to do it manually, though. Make two passes through the data, so that we can size our return value accurately from the beginning. This is cheap enough compared to the allocation, which grows linearly in the number of peers, that it is worth doing. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
500 Internal Server Error
Gitea Version: 1.28.0+dev-477-g8b6ad49a5f