PERF: Improve cook_url performance for topic thumbnails (#11609)

- Only initialize the S3Helper when needed
- Skip initializing the S3Helper for S3Store#cdn_url
- Allow cook_url to be passed a `local` hint to skip unnecessary checks
This commit is contained in:
David Taylor
2020-12-30 18:13:13 +00:00
committed by GitHub
parent 1cd6ff15dc
commit 13e39d8b9f
5 changed files with 25 additions and 22 deletions

View File

@ -169,7 +169,7 @@ RSpec.describe 'Multisite s3 uploads', type: :multisite do
let(:client) { Aws::S3::Client.new(stub_responses: true) }
let(:resource) { Aws::S3::Resource.new(client: client) }
let(:s3_bucket) { resource.bucket("some-really-cool-bucket") }
let(:s3_helper) { store.instance_variable_get(:@s3_helper) }
let(:s3_helper) { store.s3_helper }
let(:s3_object) { stub }
before(:each) do