mirror of
https://github.com/containers/podman.git
synced 2025-07-01 00:01:02 +08:00
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 Signed-off-by: Alexander Larsson <alexl@redhat.com>
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user