ContainerEngine.SetupRootless(): Avoid calling container.Config()
This is a very expensive call as it deep duplicates the Config, and
we just need to read a single member, so use ConfigNoCopy() instead.
[NO NEW TESTS NEEDED] Just minor performance effects
@@ -136,7 +136,7 @@ func (ic *ContainerEngine) SetupRootless(_ context.Context, noMoveProcess bool)
paths := []string{}
for _, ctr := range ctrs {
- paths = append(paths, ctr.Config().ConmonPidFile)
+ paths = append(paths, ctr.ConfigNoCopy().ConmonPidFile)
}
if len(paths) > 0 {
