Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pre-define capacities for rollups and TLFs (#353)
## Which problem is this PR solving? - Similar to honeycombio/libhoney-go#197, profiling shows we spend a lot of time in github.com/honeycombio/beeline-go/trace.(*Span).send generating the map. ## Short description of the changes - define the map capacity in advance before returning it. a subsequent follow-up might be allowing passing a map in its entirety to github.com/honeycombio/libhoney-go.(*Event).AddField so that the map entries do not need to be added one at a time when merging the maps together. Or, better yet, golang/go#56182 could prevent this problem by giving us a more sensible API for mass additions to a map.
- Loading branch information