pingcap/tidb

use hack.Slice in ColumnInfo:Dump to avoid unnecessary `string to slice` conversation

Fechada

#32.073 aberto em 30 de jan. de 2022

 (3 comentários) (1 reação) (1 responsável)Go (6.186 forks)batch import
help wantedtype/enhancementtype/performance

Métricas do repositório

Stars
 (40.090 estrelas)
Métricas de merge de PR
 (Mesclagem média 14d 4h) (346 fundiu PRs em 30d)

Description

Enhancement

In some read-heavy workloads, we found that Column Dump causes some CPUs

image

Through the flamegraph, we can see that nearly 1% of CPU is caused by string to slice conversation. We can ensure that we don't change the slice value in the Dump function, https://github.com/pingcap/tidb/blob/master/server/column.go#L41, so we can use hack.Slice instead.

Guia do colaborador