Squirrel.Mac icon indicating copy to clipboard operation
Squirrel.Mac copied to clipboard

Download straight to disk, don’t accumulate in memory

Open keithduncan opened this issue 12 years ago • 3 comments

Currently the ZIP download keeps the data in memory, if we can avoid it we should stream this straight to disk

keithduncan avatar Sep 16 '13 17:09 keithduncan

Looks like we can use NSURLDownload for this purpose, although it's hard to tell whether it's still a recommended API.

jspahrsummers avatar Sep 17 '13 07:09 jspahrsummers

NSURLDownload only runs in the default mode on its runloop, we’d have to run it in a background thread to avoid it pausing while you have a menu open, yep :trollface:

I reckon we could get the NSURLConnection download delegate to work for this, I know we looked at this at summit and it looked fraught but I’ve used this with great success in the past

keithduncan avatar Sep 17 '13 09:09 keithduncan

loljk the download delegate doesn’t work after all

keithduncan avatar Sep 19 '13 13:09 keithduncan