bacongobbler/docker-registry-driver-swift — pull request #5 by cezarsa (2014-06-10 16:53:12+00:00)
Title: Performance improvements

Hi there. First of all, thank you for creating this driver for the registry. :)
This pull request addresses some performance issues I found while testing this driver in our environment.

First it avoids calling `get_content` in `exists` and `get_size` methods. Instead these methods now call `head_object` from the swiftclient API which only return http headers from the object.

Another improvement is adding the `content_redirect_url` method to the driver, in accordance to the [docs](https://github.com/dotcloud/docker-registry/blob/master/depends/docker-registry-core/docker_registry/core/driver.py#L130) implementing this method allows the registry to return a 302 redirect to the client when trying to download the layer if `storage_redirect` config option is set to true.

The last change is allowing `swift_object_storage_url` to be set directly instead of using the default value returned by the auth request. This is useful if you have a different frontend URL for swift than the one returned by the API.