Performance - Apps Script VS IMPORTRANGE()

245 views
Skip to first unread message

Antonio Santos

unread,
Nov 22, 2022, 8:02:27 AM11/22/22
to Google Apps Script Community
Hi!

I have a question on which approach is better performance wise given the following the situation:

01 - Use the same file and Apps Script all the way
 - Save tab data into 3 other tabs (about 150 columns worth of data each and 5 rows at the most);
 - Bring the data from these tabs for edits and save back into them;
 - All the "processing gets done in one file"

02 - Save the form tab data into another file
 - Import these tabs via IMPORTANGE(), so that when an edit is needed, the script goes to the same file for fetching the data instead of bringing it from another file.
 - When saving, it puts the data into the other file.

I am wondering if having IMPORTANGE() bring the data is less performant than having it all run on the same file.

Thanks for your attention!



cwl...@gmail.com

unread,
Nov 22, 2022, 8:20:52 AM11/22/22
to Google Apps Script Community
I may be wrong, but I would think keeping it in the same Spreadsheet without making external data calls should always outperform local operations (assuming in the big Googliverse each Spreadsheet is actually its own object).

If you are using a lot of calculations on your data and the Spreadsheet is always very slow (each row is performing the same calculation in a cell as the row above and below it), learn how to use arrayFormula() which will speed up your sheet 100X. 
ArrayFormula() was the best thing I ever learned in Google sheets for speeding up sheet performance. (again, assuming this could be the real problem behind you asking your question. --If not, I apologize for my assumptions) :)

Antonio Santos

unread,
Nov 22, 2022, 8:29:39 AM11/22/22
to Google Apps Script Community
Thanks for your comment. I'll go ahead keeping it all in the same file. 
Reply all
Reply to author
Forward
0 new messages