3

I have a Web App where the script is connected to a Spreadsheet. In the script, I look up a file's ssid from the spreadsheet, I open that file, and then I copy and rename it. The relevant line looks like this:

var copy = SpreadsheetApp.openById(ssid).copy(newName);

That line consistently takes about 5 seconds to execute. Has anyone else experienced this delay? Is there any way to optimize this task?

Rubén
  • 34,714
  • 9
  • 70
  • 166
Carrie
  • 1,037
  • 2
  • 12
  • 19

1 Answers1

0

If you are looking to speed up your web-app, try using the advanced services instead of services like Spreadsheet (Class SpreadsheetApp ) and Drive (Class DriveApp) as Google Apps Script platform is intended to make it easy to automate Google apps rather than making optimal apps.

Also you could try to use the Sheets or Drive APIs directly... you might have to spend more time programming but it might be worthy if your app will be creating a lot of spreadsheets.

Related

Rubén
  • 34,714
  • 9
  • 70
  • 166