DB: make loading container states optional

Loading container states speed things up when listing all containers but
it comes with a price tag for many other call paths.  Hence, make
loading the state conditional to allow for keeping `podman ps` fast
without other commands regressing in performance.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2023-01-26 10:20:38 +01:00
parent 6132c4d548
commit c74bdae351
13 changed files with 83 additions and 71 deletions

View File

@ -49,7 +49,7 @@ func (r *Runtime) migrate() error {
return err
}
allCtrs, err := r.state.AllContainers()
allCtrs, err := r.state.AllContainers(false)
if err != nil {
return err
}