Add perf comments

This commit is contained in:
Joseph Schorr 2014-11-05 12:27:38 -05:00
parent 408fd229a7
commit a35bc11912
4 changed files with 20 additions and 0 deletions

View file

@ -228,6 +228,8 @@ def create_repository(namespace, repository):
for desc in image_descriptions])
new_repo_images = dict(added_images)
# TODO PERF IMPROVEMENT: Doesn't need the locations OR the imagestorage, so just select the images
# directly. Also use a set here.
for existing in model.get_repository_images(namespace, repository):
if existing.docker_image_id in new_repo_images:
added_images.pop(existing.docker_image_id)