dropbox-sdk-obj-c: Batch file upload is blocking the main thread for 1 second several times

When calling the batch upload convenience API (DBCustomRoutes.m#L31), the main thread will freeze while it waits for the uploads to finish.

This is happening because of two sleep(1) calls that are enqueued on the main thread:

I have a proposed fix, which creates a new NSOperationQueue that’s dedicated to monitoring the completion status: https://github.com/dropbox/dropbox-sdk-obj-c/pull/241

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 30 (13 by maintainers)

Most upvoted comments

@guidedways @pascalfribi @yoasha @roostr Turns out the fix was very simple thanks to @roostr! I just merged his PR and will be issuing a release sometime today after I fix a serialization issue we just found. Will keep y’all updated on this thread

Hi folks!

I spoke with engineering and this fix is on the roadmap for the next SDK update (at the latest). Our apologies for the delay, but rest assured this issue (and corresponding PR) are on our radar.