i'm wondering if there is an upper limit on how many setImageWithUrl messages can be submitted at one time ?i'm trying to load 30 photos , 10 of them are downloaded successful but the others entered in the requestFailed when trying to debug the issue
any hints or clarification ? Thanks
For those who would come here seeking the answer about maximum number of concurrent downloads in SDWebImage, I would like to add to the previous answer.
I would not recommend changing init of SDWebImageDownloader, as you might want to update the SDWebImage or, like me, adjust the number of concurrent downloads in different areas of your app.
//thumbnails.m
//Loading thumbnails. It is faster to load them concurrently
SDWebImageManager.sharedManager.imageDownloader.maxConcurrentDownloads = 10;
[yourImageView setImageWithURL:thumbURL];
//fullScreen.m
//Loading big images in full-screen view,
SDWebImageManager *sharedManager = [SDWebImageManager sharedManager];
[sharedManager.imageDownloader setMaxConcurrentDownloads:1];
[sharedManager cancelAll]; //cancel all current queue
[yourImageView setImageWithURL:URL];
Though your problem was due to incorrect urls as you mentioned, I am answering this for others who come in looking for the answer:
One can set the maximum concurrent download count in the latest release of SDWebImage framework by setting the variable, downloadQueue.maxConcurrentOperationCount in the init of SDWebImageDownloader. this would limit the maximum number of concurrent downloads for the 'downloadwithURL' call in the application. The framework would put any additional operations in the queue and execute them as the currently executing download completes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With