Skip to main content

Hi team, I am fetching a folder with java API and I am facing a timeout issue with  folder.getChildren(("fieldnames"]) which is taking over 20 seconds to iterate over the 3 files that a folder is containing. I set up the rate limit by 1 qps or 5 qps, the result is the same. Is there a way to speed that up? or do you have some ideas for improving?


This folder will contain over 1000 subfolders in production environment, I notice that the default value for the getChildren is 1000.  How could I iterator the whole folder efficiently?


public Iterable<BoxItem.Info> getChildren(final String... fields) {
return () -> {
String queryString = new QueryStringBuilder().appendParam("fields", fields).toString();
URL url = GET_ITEMS_URL.buildWithQuery(getAPI().getBaseURL(), queryString, getID());
return new BoxItemIterator(getAPI(), url, marker(DEFAULT_LIMIT));
};
}

Hi Qin, 


Welcome to Box Community and glad to assist!


Let me create a new case and a member of our team will be in touch, please keep an eye out.


Thanks for posting!


Reply