-1

I've a service which gives JSON response of about 15000 records. When calling that service in iOS 9 (iPad Air) using NSURLSession dataTask its taking 2 to 3 minutes, but the same service is taking 10 to 12 minutes in iOS 10.

Has anyone come across the same situation?

I am using NSURLSession dataTask with delegates.

Ekta Padaliya
  • 5,553
  • 2
  • 37
  • 46
i 4322946
  • 153
  • 2
  • 8

1 Answers1

-1

Why are you using a data task for something that takes minutes to fetch? Use a download task. Data tasks are meant for fairly short requests....

dgatwood
  • 9,519
  • 1
  • 24
  • 48
  • That is *absolutely* true. You're talking to the person who originally wrote the documentation for that API. If you're downloading a piece of content that's big enough that it takes minutes to download, you should almost invariably be writing it to disk and parsing it later, and doing so a piece at a time rather than keeping such a huge piece of data in RAM. You're potentially running on a device with less than a GB of RAM. – dgatwood Oct 07 '16 at 04:54