I am building a Windows Phone 8 app which uses the background transfer agent to download assets (i.e. images, audio etc...) that are used in the app. A typical scenario for the app to download would be made up of:
- 600 individual assets
- a total of 35Mb of assets
- most of the assets are tiny (< 100k) but there are some which are large (>100k and <8Mb); we cannot be 100% sure what is large & what is tiny
- We need to allow download in the background (i.e. it is very likely they start the download and leave)
- We cannot change the model of downloading so many individual files.
However I find is that this absolutely punishes the phones performance:
- CPU is hit ridiculously hard
- Have hit out of memory issues
I suspect this is that each background download (600 of them, set to run at 5 at a time) is an individual thread. My question is; are there ways to improve the performance of the background transfer?