Long wait time (TTFB) for transformations
Hi
We're seeing very long wait times (time to first byte) when fetching images with on-the-fly transformations.
Example:
Source image has transformations: c_limit,fl_progressive,g_center,h_1050,q_90,w_1920
Then we fetch new derivative with: c_lfill,g_auto,w_2688,h_2298,q_70,fl_progressive
The result is a 244KB image, and it takes only 360ms to download but we wait for it (TTFB) for 1.53 seconds. We've seent his wait time go up above 3 seconds.
I assume this is due to the transformations - we have to wait for the server to do work on the image. But are these wait times normal? What can we do to optimize them?
We're trying to use a viewport-based approach, where a background image is fetched with dimensions based on client's viewport (screen) on-the-fly. But with these waiting times its just not worth it.
Thanks!
-
Official comment
Hi,
Sorry for the late response.
Please note that this delay in TTFB happens only on the **first** access of the image (when performing transformations on-the-fly). All subsequent calls will be much quicker (as the derived image is ready and it comes from the CDN).
Hope it makes sense, please feel free to reach out again if you have any further questions.
Best,
Maor
-
Hi Aksel, can you please share some URL examples, where you see these slow downloading times? any specific page/s this is happening on? If you want to keep this information private, please feel free to open a support ticket.
0 -
Hi,
We have the sometime the same issue.
I'm using the intersectionObserver to add the cld-responsive class when an img enters the viewport. With this method, the images are loaded at the right size at the right moment.
At the worst case scenario, you download images one by one. This scenario seems to negate the avantages of HTTP/2.
Does cloudinary have some insights ?
Thanks,
0
Post is closed for comments.
Comments
3 comments