Java SDK slow meta data request
AnsweredWhen I request meta data for a file ID it takes 0.3 - 0.5 seconds to retrieve the meta data and enhance my object with file information with the meta data. If the search finds 50+ files it takes a while to get all data. Like this
for(BoxItem.Info info: searchResult) {
BoxFile boxFile = new BoxFile(api, info.getID());
BoxFileMetadata boxFileMetadata = new BoxFileMetadata();
Metadata metadata = boxFile.getMetadata(template, "enterprise");
boxFileMetadata.metadata = metadata;
boxFileMetadata.itemInfo = info;
fileMetadataInfo.add(boxFileMetadata);
}
There is no meta data object in the search result (in the BoxItem.Info object). It would be nice if there was a method to get the file information (BoxItems) and meta data in one search request.
-
Hi ,
Thanks for the suggestion. The main reason behind not embedding all information in the return object is due to response time and load being impacted when it may not always be needed for integrations. With that said, we are exploring methods for allowing folks to create more composite APIs to be able to bind multiple calls together, so I'll add this one to the list that we explore.
Thanks,
Jon
Please sign in to leave a comment.
Comments
2 comments