humanmade / S3-Uploads

The WordPress Plugin to Store Uploads on Amazon S3
1.95k stars 392 forks source link

Extreme performance issues caused by `add_s3_signed_params_to_attachment_image_src()` #597

Closed ouun closed 1 year ago

ouun commented 2 years ago

Hi there,

Thanks again for the great plugin!

Fighting very slow page loading times in a project, I was able to identify the cause in the "S3 Uploads" in: S3_Uploads\Plugin::add_s3_signed_params_to_attachment_image_src()

The plugin & call increases the processing time of the wp_get_attachment_image_src hook from around 1ms by 1000x to 1500x times.

I am wondering if this could be a bug, configuration or even a connection issue to the S3 endpoint. Some advices on how this could be possible and fixable would be great.

Thanks a lot and kind regards,

Philipp

roborourke commented 2 years ago

The private signed URLs aren't really intended for front end usage. Were you able to narrow it down further? Is there a trace / profile you can share?