mirror of
https://github.com/containers/podman.git
synced 2025-05-21 09:05:56 +08:00
libpod: do not call (*container).Config()
Access the container's config field directly inside of libpod instead of calling `Config()` which in turn creates expensive JSON deep copies. Accessing the field directly drops memory consumption of a simple `podman run --rm busybox true` from 1245kB to 410kB. [NO TESTS NEEDED] Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
@ -222,7 +222,7 @@ func (r *Runtime) setupSlirp4netns(ctr *Container) error {
|
||||
defer errorhandling.CloseQuiet(syncR)
|
||||
defer errorhandling.CloseQuiet(syncW)
|
||||
|
||||
havePortMapping := len(ctr.Config().PortMappings) > 0
|
||||
havePortMapping := len(ctr.config.PortMappings) > 0
|
||||
logPath := filepath.Join(ctr.runtime.config.Engine.TmpDir, fmt.Sprintf("slirp4netns-%s.log", ctr.config.ID))
|
||||
|
||||
ctrNetworkSlipOpts := []string{}
|
||||
|
Reference in New Issue
Block a user