4 ms·
I am surprised that it is faster to resize the image, than to pass the (resized) bits right through. Is the outbound network a bottleneck?
by discardorama 11y ago
I am surprised that it is faster to resize the image, than to pass the (resized) bits right through. Is the outbound network a bottleneck?
- kalleboo 11y agoIt could be that there are a lot of images/versions that simply never get seen, or seen rarely enough that it's inefficient to store them. And they're being cached by the CDN anyway, so popular images will still only be generated once per edge.
- Renat 11y agobingo! Extra storage for all the resized images that never get seen, lack of flexibility to introduce new sizes, plus requirements for watermarking and attribution on images are the main reasons why we are moving away from pre-conversion to dynamic image resizing
- Melraidin 11y agoGenerating many conversions for all photos incurs both storage and computational overhead that may never pay off. By only generating the required images on the fly for photos we avoid this overhead while allowing more flexibility. If watermarks or attribution change in the future it's easier to have the resize service in place to handle this as images expire from the CDN than to do a batch job to pre-process the updated conversion requirements for all existing photos. Also note that photos are stored indefinitely, so any additional permanent storage (new conversions) would add additional storage costs, miniscule as they might be, forever.