Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 #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 ```
- Loading branch information