Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
Remove re-allocation optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
shanson7 committed Dec 6, 2018
1 parent 6496f85 commit 3ab9709
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions expr/func_groupbytags.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ func (s *FuncGroupByTags) Exec(cache map[Req][]models.Series) ([]models.Series,
aggFunc := getCrossSeriesAggFunc(s.aggregator)

// Now, for each key perform the requested aggregation
numPoints := len(series[0].Datapoints)
cons, queryCons := summarizeCons(series)

for name, groupSeries := range groups {
Expand All @@ -121,9 +120,6 @@ func (s *FuncGroupByTags) Exec(cache map[Req][]models.Series) ([]models.Series,

newSeries.Datapoints = pointSlicePool.Get().([]schema.Point)

if cap(newSeries.Datapoints) < numPoints {
newSeries.Datapoints = make([]schema.Point, 0, numPoints)
}
aggFunc(groupSeries, &newSeries.Datapoints)
cache[Req{}] = append(cache[Req{}], newSeries)

Expand Down

0 comments on commit 3ab9709

Please sign in to comment.