Files
kubernetes/pkg/controller
Kubernetes Submit Queue e6f64d0a79 Merge pull request #64916 from mfojtik/ds-01-improve-mem-usage
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

improve memory footprint of daemonset simulate

**What this PR does / why we need it**:

This is an alternative for https://github.com/kubernetes/kubernetes/pull/64915 (it might be not needed if that PR will merge)

During memory profiling of OpenShift, we noticed a significant amount of object allocations done by `IsControlledBy()`. @sttts found that the `GetObjectReferences()` method is doing a deep-copy of the object references. 

![screen shot 2018-06-08 at 14 22 59](https://user-images.githubusercontent.com/44136/41157922-7af953f2-6b27-11e8-9a16-bda8c3edfe07.png)

This PR simplify the `IsControlledBy()` to just iterate over the ownerRefs, without copying them. 

**Release note**:

```release-note
NONE
```
2018-06-11 08:56:20 -07:00
..
2018-04-27 07:56:42 -04:00
2018-05-11 13:12:09 -04:00
2018-05-30 14:46:48 +02:00
2018-02-16 13:43:01 -08:00
2018-06-05 04:50:37 -04:00
2018-04-01 18:57:29 +10:00
2018-02-16 13:43:01 -08:00
2016-10-13 16:10:24 -07:00
2018-05-22 13:42:10 -07:00
2017-11-14 17:18:17 +08:00
2016-07-16 13:48:21 -04:00