Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

reduce calls to containers.list() #289

Merged
merged 1 commit into from
Nov 11, 2020

Conversation

bmc-msft
Copy link
Contributor

Once an instance has massively large numbers of jobs, containers.list() becomes unacceptably slow.

This removes container.list() in two places.

  1. Template helper. As creating containers is effectively idempotent, it's more efficient to always create the container, rather than check if the container exists and create it otherwise.
  2. Template deletion. As container.delete() returns a BoolResult of "true if deleted, false if it didn't exist", we can still indicate if the deletion occurred, without the overhead of checking if the container exists prior to deletion.

@bmc-msft
Copy link
Contributor Author

passed integration tests

@bmc-msft bmc-msft merged commit 7b34cf2 into microsoft:main Nov 11, 2020
@bmc-msft bmc-msft deleted the dont-list-containers branch November 11, 2020 17:18
@ghost ghost locked as resolved and limited conversation to collaborators Apr 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants