Slow image transformations, how to troubleshoot?

Hello, we are using CloudFlare images for serving transformed images in our product. The images are transformed via worker, original image is fetched from R2. The problem is that sometime transformation performance is poor, for the original image of ~100KB and result image of ~5KB it may take up to 30 seconds to get the image. I wonder if there is a way to understand what may take so much time ?
2 Replies
James
James3w ago
Is there a specific image and transform options that reliably reproduce the slowdown?
valerikthepigeon
valerikthepigeonOP3w ago
@James no, it is randomly, for the same image we can sometimes have relatively fast response (less than 1 second) and sometimes 30+ seconds. Half of this time it waits for the server to respond and the rest of the time is downloading (yes, 15 seconds for 4kb which is ridiculous). We tried to log time around fetch, but it did not show the problem (the execution time was < 1 sec).

Did you find this page helpful?