mirror of
https://github.com/containers/podman.git
synced 2025-05-17 23:26:08 +08:00
ps: do not sync container
Do not sync containers with the runtime and the database when listing containers. It turns out to be extremely expensive and unnecessary. The sync was needed since listing all containers from the database did not populate their state. Doing that, however, is much faster since we already have a connection to the database. This change makes listing 200 containers 2 times faster than before. [NO NEW TESTS NEEDED] Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
@ -829,10 +829,6 @@ func (c *Container) Batch(batchFunc func(*Container) error) error {
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
|
||||
if err := c.syncContainer(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
newCtr := new(Container)
|
||||
newCtr.config = c.config
|
||||
newCtr.state = c.state
|
||||
|
Reference in New Issue
Block a user