mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 21:36:24 +00:00
Improve the performance of map usage
Signed-off-by: mantuliu <240951888@qq.com>
This commit is contained in:
parent
8f15859afc
commit
838ed7feb5
@ -147,7 +147,7 @@ func (sc *stateCheckpoint) storeState() error {
|
||||
|
||||
assignments := sc.cache.GetCPUAssignments()
|
||||
for pod := range assignments {
|
||||
checkpoint.Entries[pod] = make(map[string]string)
|
||||
checkpoint.Entries[pod] = make(map[string]string, len(assignments[pod]))
|
||||
for container, cset := range assignments[pod] {
|
||||
checkpoint.Entries[pod][container] = cset.String()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user