Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Jopo-JP's avatar
Jopo-JP
Explorer | Level 3
3 years ago

API moving/renaming of files is slow

At the moment i'm testing the api and noticed if i move multiple files/folder it only moves one file a second.
Renaming also suffers from the same problem.
This seems rather slow.

On the webpage it seems not fast but happens a bit faster.

 

Is there a hard limit or can it be optimized?

It can cause issues for me, if multiple people at once work on files in dropbox and move stuff around with 100s pdf and this will result in a big wait time.
The user expect, that the files will be transferred in an instant, but depending on how much is happening, this might result in queue where the user has to wait until the transaction has been completed.
At the current time, i implemented a queue system, so everthing is been ordered and no command gets lost or timeout.


Uploads are fine  with or without the batch feature and opening and downloading it.

5 Replies

  • Здравко's avatar
    Здравко
    Legendary | Level 20
    3 years ago

    Jopo-JP wrote:

    At the moment i'm testing the api and noticed if i move multiple files/folder it only moves one file a second.
    Renaming also suffers from the same problem.
    This seems rather slow.

    ...

    It can cause issues for me, if multiple people at once work on files in dropbox and move stuff around with 100s pdf and this will result in a big wait time.

    ...


    Hi Jopo-JP,

    When you say "move multiple files/folders", do you mean batch operation or just single move at a time? 🧐👈 In batch multiple files/folders (up to 1000) can move/rename at once (in border of this second you're talking about). 😉

    Hope this helps.

  • Jopo-JP's avatar
    Jopo-JP
    Explorer | Level 3
    3 years ago

    Thanks for the fast response.

    It depends on what the user is currently doing and many.
    If the user edits a file and saves or rename it, there is no batch operation.
    If the other user are doing something similar, they have to technically wait a second.

    If a user moves many files, folder in one go, i use the batch operation and after a short time, it gets the job done.

    My issues occurs if users try to move smaller files at the same time from different locations, the delay happens.
    I might have to flesh my queue system out, so after a threshold has been reached, it should try to categorize it and batch it afterwards.

    I though, i wouldn't hit the limit that fast and need to use batch operations this early. 

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    3 years ago

    Yes, it's generally best to use /2/files/move_batch_v2 when you have multiple items to move/rename.

     

    Otherwise, there isn't a way to improve the speed of these operations on the API, but I'll pass this along as a request. I can't promise if or when that might be optimized though.

  • Здравко's avatar
    Здравко
    Legendary | Level 20
    3 years ago

    Jopo-JP wrote:

    ...
    If the user edits a file and saves or rename it, there is no batch operation.
    ...


    Jopo-JP, Save and rename operations cannot execute in batch together, but multiple save (upload actually) operations on one side and multiple rename (move actually) operations on other side can be executed in corresponding batches. Even more if you plane to save a file and rename the same file after that, better save this file at the new name, so you will avoid the rename - one operation less.

     


    Jopo-JP wrote:

    ...
    If the other user are doing something similar, they have to technically wait a second.
    ...


    To be honest I have no idea of your application design, but when different users use your application on their accounts, there is no any reason one user action to affect any other user (including possible delay if we ignore some corner cases). There is always some way for optimization, but it's closely related to your design (possibly including the steps you mentioned).

    Another good direction (if possible for your design) is limiting possibility different users to work on the same namespace as much as possible. Such work predispose conflicts/delays.

    Good luck.

  • Jopo-JP's avatar
    Jopo-JP
    Explorer | Level 3
    3 years ago
    Thank you for your info.
    I just thought, that processing one file per second does feel quite slow.
    Disregarded my problem above.
    There could be the option, where Dropbox could response a lot faster for the first few files before slowing down.

    Just like a allowance for a smaller burst of transaction in a short time or period.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

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, Facebook or Instagram.

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!