mirror of
https://github.com/containers/podman.git
synced 2025-06-30 15:49:03 +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{}
|
paths := []string{}
|
||||||
for _, ctr := range ctrs {
|
for _, ctr := range ctrs {
|
||||||
paths = append(paths, ctr.Config().ConmonPidFile)
|
paths = append(paths, ctr.ConfigNoCopy().ConmonPidFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(paths) > 0 {
|
if len(paths) > 0 {
|
||||||
|
Reference in New Issue
Block a user