Commit Graph

2 Commits

Author SHA1 Message Date
Brad Davidson 815817c058 Optimize getDistinctNamespaces
The current implementation will perform poorly when the desiredset
contains a large number of objects and namespaces, as it does a linear
scan of the string slice for each object. A more optimal approach is to
build a map of namespaces, and just return the map keys. This is much
faster since map operations are O(1).

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-12-14 10:23:18 -08:00
Jacob Payne e2966973ca fixed permissions errors when applying multiple namespaces 2021-11-10 16:53:28 -07:00