3 ms·
> This is likely to put too much pressure on the CPU and memory of the decoding client as each refresh event involves a full pass through the decompression syst
by maxloh 5y ago
> This is likely to put too much pressure on the CPU and memory of the decoding client as each refresh event involves a full pass through the decompression system.
> On average, decoding a progressive JPEG image is equivalent to decoding the baseline one 3 times.
This feature wasn't added for a reason[0].
[0]: https://developers.google.com/speed/webp/faq#does_webp_support_progressive_or_interlaced_display https://developers.google.com/speed/webp/faq#does_webp_suppo...
- bick_nyers 5y agoInteresting, although it will depend on how bandwidth constrained your users are vs. their CPU/memory profile. If downloading images takes longer than decoding, it swings in favor of progressive decode. In .jxl, it is an optional feature.
- jonsneyers 5y agoProgressive JPEG has ~10 scans by default in libjpeg/mozjpeg. Lossy JPEG XL always allows minimal progression (2 scans, 1:8 followed by 1:1), and uses maybe 3-5 scans when encoding with more progression. In any case, I think the "costs too much cpu" argument is not really fair, since there is nothing forcing an implementation to do explicit flush/repaint at every scan. In fact, browsers will only do a refresh when cpu is _not_ the bottleneck, but network is. When cpu _is_ the bottleneck (e.g. the file is loaded from local cache), you can just decode the whole file non-progressively and have only a single refresh (just like with inherently non-progressive formats). If network is the bottleneck, then the choice is between cpu time (avoiding progressive previews to save some cpu effort) and human time (show previews so something can be shown earlier). I think human time is more valuable, by a few orders of magnitude.