Skip to content

DigitalOcean region fetching adds almost half a second to each page load without any reason. #237

Description

@twisted1919

Hi,

There's a problem with the DigitalOcean connection, because it extends from S3 storage, it tries to fetch the region remotely on each page load, but the region is not needed for DigitalOcean, thus is never fetched, never stored and always queried for.

In S3Storage::getClient you call S3Storage::getS3Client which in turn calls S3Storage::getBucketRegion which then uses the s3 client to determine the region by calling S3Client::determineBucketRegion. So this is a remote call. Which takes time. And there is no need to do something like this for DigitalOcean. We simply added this method in the DigitalOceanStorage class:

public function getBucketRegion() {
    return 'us-east-1';
}

Because DO does not care about this at all but this way we simply skip a very expensive network call.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions