mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Merge pull request #117803 from sourcelliu/preFilterState
Optimize the performance of the Clone method of preFilterState
This commit is contained in:
commit
c6887b1c00
@ -93,8 +93,7 @@ func (s *preFilterState) Clone() framework.StateData {
|
|||||||
copy.TpKeyToCriticalPaths[tpKey] = &criticalPaths{paths[0], paths[1]}
|
copy.TpKeyToCriticalPaths[tpKey] = &criticalPaths{paths[0], paths[1]}
|
||||||
}
|
}
|
||||||
for tpPair, matchNum := range s.TpPairToMatchNum {
|
for tpPair, matchNum := range s.TpPairToMatchNum {
|
||||||
copyPair := topologyPair{key: tpPair.key, value: tpPair.value}
|
copy.TpPairToMatchNum[tpPair] = matchNum
|
||||||
copy.TpPairToMatchNum[copyPair] = matchNum
|
|
||||||
}
|
}
|
||||||
return ©
|
return ©
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user