Commit 5fb74fc1 authored by Martin Möhrmann's avatar Martin Möhrmann
Browse files

runtime: reduce allocations when building pprof LabelSet

Pre-allocate the slice of labels with enough capacity
to avoid growslice calls.

Change-Id: I89db59ac722c03b0202e042d1f707bb041e0999f
Reviewed-on: https://go-review.googlesource.com/c/go/+/181517


Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: default avatarMichael Matloob <matloob@golang.org>
parent 37373592
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment