How to increase the downloading speed in an app using dispatch queue ?
I am using dispatch queues to download images in my app but it takes time when it is downloading for the first time as after that I am storing them into cache. But I want to download them faster for the first time too.
Can anybody suggest me a way for this to use with the dispatch queues?
In my opinion, you can use a queue with high priority and then the system will take a decision. I do not think you can do more with grand central dispatch
dispatch_queue_t q = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)
Use this queue to download operations.
Queue isn't threads, system manages threads. You can use a queue with priority or concurrent queue (good idea Kyokook Hwang) and the system will decide the best performance.
If you want to increase downloading speed of each image, I have no idea to make it with GCD.
But, I think that you had better use a concurrent dispatch queue rather than a serial queue if you are using a serial queue to download them.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.