News for hackers. Stuff that matters.
Re:Chrome still hasn't changed its opinion about dropping JP... by PaulHoule on Tuesday June 06, 2023 @11:20AM (#36214203)
With the high cost of cloud storage I see it as a pretty big burden to host multiple copies of an image, particularly if you feel compelled to have multiple optimized images such as JPEG, WEBP, AVIF, ... That's why I didn't start using WEBP for images until support was universal enough that I could give up JPEG.

(For a large image collection you have some images that are heavily requested and most of the cost is network transfer, but you also have many images that are infrequently requested and for those the cost of storage in the dominant factor. I launched a large image collection in the late 2000's and many sites that did the same thing at the same time were ultimately crushed by running costs, Pinterest and Instagram were survivors, overall the economics of video collections turned up to be better than images.)

Re:Chrome still hasn't changed its opinion about dropping JP... by ilyt on Tuesday June 06, 2023 @11:41AM (#36214543)
I guess technically you could store original and encode to <whatever format is popular> on-demand then just cache the most popular ones
Re:Chrome still hasn't changed its opinion about dropping JP... by PaulHoule on Tuesday June 06, 2023 @03:29PM (#36217923)
In internet-scale systems complex delivery systems involving transformation and caching are not necessarily a win for performance insofar as once you give up a millisecond of latency you cannot get it back. You very much can get a win out of a CDN but somebody has to do aggressive tuning of absolutely everything.
Re:Chrome still hasn't changed its opinion about dropping JP... by ilyt on Wednesday June 07, 2023 @04:42PM (#36233254)
It's not for performance but for not having to permanently store terabytes of differently encoded data.

You could possibly also pre-populate cache - all new media files get sent to encoder and cached preemptively, and if they are popular enough they just stay there till they are not.

Re:Chrome still hasn't changed its opinion about dropping JP... by andrewaylett on Wednesday June 07, 2023 @05:54AM (#36224855)
Yes, we do that. Well, the CDN does the caching -- but we still get a 99.99% hit rate.

Please forgive the case study format, but I'm quite proud of what we did and this is the easiest way to back up my assertion with data: https://aws.amazon.com/solutions/case-studies/skyscanner-clo...

We're currently generating JPG, WebP, and PNG, depending on the source and the target. The problem with doing this on-demand is that formats that are great for delivery but slow to encode aren't useful. I did try to add AVIF, but the latency on the first request was too high for it to be practical.

Re:Chrome still hasn't changed its opinion about dropping JP... by ilyt on Wednesday June 07, 2023 @04:47PM (#36233319)
I guess "preheating" cache with preemptively encoding and putting new content in cache before it is shown to client could work?

But still, anything AV1 based just needs a lot performance to encode that just doesn't feel worth it at the moment. Our system to encode videos was tooled for that but developers eventually decided it's too slow/cpu hungry to bother. It was some time ago tho, encoders did get better...