3 ms·
https://random-stuff.jakearchibald.com/apps/img-decode-bench/ https://random-stuff.jakearchibald.com/apps/img-decode-bench... Taking bike.jpg and bike-repackag
by jaffathecake 18d ago
https://random-stuff.jakearchibald.com/apps/img-decode-bench/ https://random-stuff.jakearchibald.com/apps/img-decode-bench...
Taking bike.jpg and bike-repackaged.jxl in that demo, on my Pixel 10 Pro in Firefox Nightly, the size and decoding times are:
bike.jpg - 147 kB - 10ms
bike-repackaged.jxl - 126 kB - 33ms
So, I save 21 kB, but pay 23ms.
That extra 21 kB isn't part of a new request, so when it comes to download performance, we're talking about an active response. At 3g speeds, in 23 ms you can download somewhere between 20-118 kB, so at best, it evens out.
If it's a lower end device, the decode delta increases. If it's a faster connection, the 21 kB saving matters less. If the image was cached, then I'm just paying the decode overhead.
- Joker_vD 18d agoPeople really, really like to try to save up on the matches, so to speak. Sometimes literally: there was a short period of time during Khrushchev's rule in the USSR when the natural gas was made free for the populace. Well, the matches still cost money (1 kopeck for a box of 50 matches), so lots of people would just not turn the stove off, instead always having it burning the smallest possible flame when not in use. All that to say, "I save 21 kB, but pay 23ms"? You'll save more if you stop sending your favourite web font over with your page and use the system fonts, and trim down your site's JS.