Concorde icon indicating copy to clipboard operation
Concorde copied to clipboard

Doesn't Progressively Download and Decode JPEGs on iOS.

Open DavidPhillipOster opened this issue 8 years ago • 2 comments

The title of this github repository is "Download and decode progressive JPEGs on iOS." But it doesn't do the very thing that Progressive JPEG was invented to do:

Progressively download and decode JPEGs on iOS

It misuses NSURLSession to grab ALL the data (a process that takes 99% of the total time) then decodes it.

Please rewrite to use NSURLSession in stream mode, so that is passed to your CGDataProvider in bursts, decoding what you can and writing it to the screen as the data comes in.

In CCBufferedImageDecoder , you create your CGDataProvider with an NSData, but by the time you have the NSData, 99% of the time of fetching and displaying the image has already elapsed, making progressive jpeg decoding pointless.

DavidPhillipOster avatar Dec 02 '16 15:12 DavidPhillipOster

@DavidPhillipOster did you find any solution to this? Seeing it as well

oferRounds avatar Jan 16 '20 08:01 oferRounds

no, I've outlined the solution: use a CGDataProvider that in turn is driven from a NSURLSession in stream mode, but I haven't implemented it (I haven't needed it), and this project has seen no check ins in years.

DavidPhillipOster avatar Jan 20 '20 03:01 DavidPhillipOster