pingcap/tidb
use hack.Slice in ColumnInfo:Dump to avoid unnecessary `string to slice` conversation
Chiusa
#32.073 aperta il 30 gen 2022
help wantedtype/enhancementtype/performance
Metriche repository
- Star
- (40.090 stelle)
- Metriche merge PR
- (Merge medio 14g 4h) (346 PR mergiate in 30 g)
Descrizione
Enhancement
In some read-heavy workloads, we found that Column Dump causes some CPUs

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.