diff options
| author | Joe Tsai <joetsai@digital-static.net> | 2024-11-27 11:18:04 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-27 11:18:04 -0800 |
| commit | bac3af06f5a2e7dcf2976e4d8e846eab0a52b514 (patch) | |
| tree | 79c8a22d65679bbb5b9a691a58cc371ce9142455 /control/controlhttp/controlhttpserver | |
| parent | bb80f14ff42c0e167eb34d65428a63a81d1090a2 (diff) | |
| download | tailscale-bac3af06f5a2e7dcf2976e4d8e846eab0a52b514.tar.xz tailscale-bac3af06f5a2e7dcf2976e4d8e846eab0a52b514.zip | |
logtail: avoid bytes.Buffer allocation (#11858)
Re-use a pre-allocated bytes.Buffer struct and
shallow the copy the result of bytes.NewBuffer into it
to avoid allocating the struct.
Note that we're only reusing the bytes.Buffer struct itself
and not the underling []byte temporarily stored within it.
Updates #cleanup
Updates tailscale/corp#18514
Updates golang/go#67004
Signed-off-by: Joe Tsai <joetsai@digital-static.net>
Diffstat (limited to 'control/controlhttp/controlhttpserver')
0 files changed, 0 insertions, 0 deletions
