Skip to content

Commit

Permalink
perf: Remove deep-copying the allocatable resource list (#1945)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis authored Jan 31, 2025
1 parent af994ba commit bb27849
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cloudprovider/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (i *InstanceType) precompute() {

func (i *InstanceType) Allocatable() corev1.ResourceList {
i.once.Do(i.precompute)
return i.allocatable.DeepCopy()
return i.allocatable
}

func (its InstanceTypes) OrderByPrice(reqs scheduling.Requirements) InstanceTypes {
Expand Down

0 comments on commit bb27849

Please sign in to comment.