Add perf comments
This commit is contained in:
parent
408fd229a7
commit
a35bc11912
4 changed files with 20 additions and 0 deletions
|
@ -151,6 +151,9 @@ def get_image_layer(namespace, repository, image_id, headers):
|
|||
return resp
|
||||
|
||||
profile.debug('Streaming layer data')
|
||||
|
||||
# TODO: DATABASE: We should disconnect from the database here, so that
|
||||
# we're not holding the DB handle during this long download.
|
||||
return Response(store.stream_read(repo_image.storage.locations, path), headers=headers)
|
||||
except (IOError, AttributeError):
|
||||
profile.debug('Image not found')
|
||||
|
@ -212,6 +215,9 @@ def put_image_layer(namespace, repository, image_id):
|
|||
h, sum_hndlr = checksums.simple_checksum_handler(json_data)
|
||||
sr.add_handler(sum_hndlr)
|
||||
|
||||
# TODO: DATABASE: We should disconnect from the database here and reconnect AFTER, so that
|
||||
# we're not holding the DB handle during this long upload.
|
||||
|
||||
# Stream write the data to storage.
|
||||
store.stream_write(repo_image.storage.locations, layer_path, sr)
|
||||
|
||||
|
|
Reference in a new issue