pingcap/tidb
use hack.Slice in ColumnInfo:Dump to avoid unnecessary `string to slice` conversation
已关闭
#32,073 创建于 2022年1月30日
help wantedtype/enhancementtype/performance
仓库指标
- 星标
- (40,090 个星标)
- PR 合并指标
- (平均合并 14天 4小时) (30 天内合并 346 个 PR)
描述
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.