I have this code to make a temporary copy of a spreadsheet in my Google Drive:

private File copyFile(Drive service, String originFileId, String copyTitle) {
    File copiedFile = new File();
    copiedFile.setTitle(copyTitle);
    try {
        return service.files().copy(originFileId, copiedFile).execute();
    } catch (IOException e) {
        System.out.println("An error occurred: " + e);
    }
    return null;
}

But, this copy takes more than 3 seconds (only this part of my code take more than 3 seconds). The spreadsheet of this example have only 3 worksheets and only 7 cells with information.

My question is: It's normal the copy take more than 3 seconds in cases like this?

有帮助吗?

解决方案

Yes its normal. Drive api in general is slow.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top