We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

Gregg W.1's avatar
Gregg W.1
Helpful | Level 5
9 years ago

-downloadUrl seems much slower than DBRestClient's loadFile:dropboxPath

It seems that the iOS Objective-C framework support for the Dropbox API v2 is much slower at downloading large numbers (200+) of files than the original DBRestClient method.

 

For example in my iOS app...

 

v1 used this method...

[restClient loadFile:dropboxPath intoPath:localPath]; 

 

which would then do a callback to..,

-(void)loadedFile:(NSString *)localPath etc.

 

--------------------------------

 

v2 uses this method...

[dbClient.filesRoutes downloadUrl:remoteFilePath overwrite:YES destination:destinationURL]

 

With completion passing to the downloadUrl responseBlock.

 

---------------------------------

 

The original restClient method would download 250 files (10K each) in about 30 seconds and the new completionBlock method takes over a minute to download the same files on the same network and the same device.

 

Can anyone offer any insight as to why I am seeing such a slower download time with the new framework/API?

 

Is there a way to download the entire contents of a folder with a single call?

 

I am using ObjectiveDropboxOfficial v3.1.1 as an embedded xCode project but have seen the same results as far back as v3.0.1.

 

Thanks for any thoughts on this.

3 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago
    The two SDKs don't share any code, so it wouldn't be surprising if they have different performance characteristics.

    In some quick testing though, I'm not seeing quite the disparity you are. Are you running multiple downloads simultaneously? If so, how many, and are you doing the same with both SDKs?

    In any case, there isn't a way to download files in bulk, but I'll pass this along as a feature request.
  • Gregg W.1's avatar
    Gregg W.1
    Helpful | Level 5
    9 years ago

     

    Regarding multiple downloads: I have a 'fifo-spool' that limits the number of outstanding requests that are passed to the Dropbox framework. I've tried adjusting the limit between 25 and 500 simultaneous downloads and still see basically the same download times.

     

    The repsonseBlock paradigm is rather new to me so I may be doing something wrong in that area.

     

    What I am hearing from you is that the problem is on my end, and that is what I suspected. I just wanted some confirmation on that. 

     

    Thanks for your thoughts on this.

     

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago
    Thanks for the additional information. There are many different variables that can affect speeds like this of course, so it can be hard to say what's happening off hand. Let us know if there's something we can help with. For example, if you'd like to share your code, we can take a look and let you know if something looks wrong.

    Also, it may be worth trying even fewer than 25 simultaneous downloads.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 9 months ago
411 Following

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!