From 21f9b03c1478a521eb2810062a2bd758d2c39b5d Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Tue, 8 Aug 2023 14:33:29 -0700 Subject: [PATCH] [chore] [pkg/translator/jaeger] preallocate slice (#24954) --- pkg/translator/jaeger/jaegerproto_to_traces.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/translator/jaeger/jaegerproto_to_traces.go b/pkg/translator/jaeger/jaegerproto_to_traces.go index 0eda60834851..1ac848cfaf77 100644 --- a/pkg/translator/jaeger/jaegerproto_to_traces.go +++ b/pkg/translator/jaeger/jaegerproto_to_traces.go @@ -73,7 +73,7 @@ func regroup(batches []*model.Batch) []*model.Batch { } } - var result []*model.Batch + result := make([]*model.Batch, 0, len(registry)) for _, v := range registry { result = append(result, v) }