Sdwebimage: is there a limit on the number of setimageWithUrl in the queue?

I am wondering if there is an upper limit for how many setImageWithUrl messages can be sent at a time? I'm trying to upload 30 photos, 10 of them uploaded successfully, but the rest are entered in requestFailed when trying to debug the problem

any hints or clarifications? Thanks

+5
source share
3 answers

For those who came here to find the answer about the maximum number of simultaneous downloads in SDWebImage, I would like to add to the previous answer.

I would not recommend changing the init SDWebImageDownloader, since you can update SDWebImage or, like me, configure the number of simultaneous downloads in different areas of your application.

//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];
+5

URL-, , , :

SDWebImage, downloadQueue.maxConcurrentOperationCount init SDWebImageDownloader. "downloadwithURL" . .

+1

I found a strange problem setting this value. Based on the apple document, this value should only affect the simultaneous download image number, and not the total download image number. However, if my case, if this value is set to 2, I can only upload 2 images, even I call the upload function more than 2. This value seems to determine the size of the downloadQueue, not the currentOperation. Does anyone have the same problem?

0
source

All Articles