cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Performance of Dropbox getCurrentAccount

Highlighted

Performance of Dropbox getCurrentAccount

Explorer | Level 3

I'm running one of the Dropbox samples and getting very slow (>30 seconds) response on a call to getCurrentAccount(). 

 

The code looks like this: 

 

...
DbxRequestConfig config = new DbxRequestConfig(APPNAME); client = new DbxClientV2(config, ACCESS_TOKEN); FullAccount account = client.users().getCurrentAccount();
...


In our tests, the call to "client.users().getCurrentAccount()" runs for about 30 seconds before returning. This is running against the dropbox-core-sdk-3.1.5 JAR file. 

 

Any idea why getCurrentAccount() would be so slow? 

4 Replies 4
Highlighted

Re: Performance of Dropbox getCurrentAccount

Dropboxer

Thanks for the report. This isn't occurring for me, so we'll need to narrow this down. Can you let me know:

  • Is this only occurring when retrieving the information for one account in particular, or does it also happen for other accounts?
  • Is this occurring for other methods as well?
Highlighted

Re: Performance of Dropbox getCurrentAccount

Explorer | Level 3

We've tried three accounts - all seem to perform about the same (all are "PRO" accounts, if that matters). 

 

A few other details that might help: 

 

  1. This is a command-line tool - we authenticate with a access token we generated on the website. 
  2. All of the other methods seem to run fine....in the snippet I sent, from program start to the getCurrentAccount call runs in about two seconds - then getCurrentAccount consistently runs from 20-40 seconds.
  3. This is running on a small but dedicated server with a Gigabit connection - nothing else we do is slow over the network. 
  4. The results are repeatable...it's not like it just randomly occurs.   
  5. We're using Java 1.8 (161).
Highlighted

Re: Performance of Dropbox getCurrentAccount

Explorer | Level 3

I wanted to add that we discovered the problem isn't unique to "getCurrentAccount" - whichever method we call first after these two lines of code seems to take 30 seconds or so: 

 

DbxRequestConfig config = new DbxRequestConfig(APP_NAME);
DbxClientV2 client = new DbxClientV2(config, ACCESS_TOKEN);

 

We skipped the call to getCurrentAccount() and found the same issue on listFolder(), download(), etc. Seems like whichever function we call first seems to suffer this 30 second penalty. 

 

Is there some sort of tracing built into the API that might show us what's going on at a lower level? 

 

Highlighted

Re: Performance of Dropbox getCurrentAccount

Dropboxer

Thanks for the additional information. I don't know off hand what may be causing that, and I can't reproduce that behavior myself using that same code. We'll have to dig into it further.

 

You may be able to get some more logging output using:

Logger.getLogger("").setLevel(Level.ALL);
final java.util.logging.ConsoleHandler consoleHandler = new java.util.logging.ConsoleHandler();
consoleHandler.setLevel(Level.ALL);
Logger.getLogger("").addHandler(consoleHandler);

Please share the output if you get any other useful information when using that.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?