diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-04-12 10:21:45 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-04-12 10:59:00 -0400 |
commit | f7951c8776cea5eeddd8838ac6a4f41f518032fd (patch) | |
tree | 98adf052050bd0ed5b616ff3f2c60e25b38c70c4 /libpod/container_internal.go | |
parent | 638789fd88f60839bd65cad3bc28f0c698d41e32 (diff) | |
download | podman-f7951c8776cea5eeddd8838ac6a4f41f518032fd.tar.gz podman-f7951c8776cea5eeddd8838ac6a4f41f518032fd.tar.bz2 podman-f7951c8776cea5eeddd8838ac6a4f41f518032fd.zip |
Use GetContainer instead of LookupContainer for full ID
All IDs in libpod are stored as a full container ID. We can get a
container by full ID faster with GetContainer (which directly
retrieves) than LookupContainer (which finds a match, then
retrieves). No reason to use Lookup when we have full IDs present
and available.
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r-- | libpod/container_internal.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index 3c7319963..1d371966b 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -676,7 +676,7 @@ func (c *Container) getAllDependencies(visited map[string]*Container) error { } for _, depID := range depIDs { if _, ok := visited[depID]; !ok { - dep, err := c.runtime.state.LookupContainer(depID) + dep, err := c.runtime.state.Container(depID) if err != nil { return err } |