I\'ve got a Google Doc with Google Apps Script script running that multiple people contribute to. There is an onEdit
trigger that is fired when people edit the shee
Q1: Does a
setValues()
take longer than asetValue()
?
A1: It's no. About this, you can see from the following experimental result.
Q2: Does a
setValues()
call of a small array take less time than asetValues()
of a large array?
A2: It's yes. About this, you can see from the following experimental result.
Q3: I had presumed one write to the sheet should take about the same amount of time regardless of size. Is there any way I can minimize this time?
A3: When you want to reduce the process cost for putting the values more, how about using Sheets API? About this, you can see it at the figure of "A2".
The rationale of above answers is Benchmark: Reading and Writing Spreadsheet using Google Apps Script.
As @TheMaster's comment, I also think that your issue might be resolved by LockService.