0

Recently the Google Apps Script method [range].getValues() has stopped performing as quickly as it used to. Now it is sluggish to the tune of taking about 10 seconds to either .getValue() of a single cell range or .getValues() of a multi-cell range. I'm sure we will just have to wait for Google to fix the issue but I use this so much it's causing some issues in some of my programmatic work-flow.

What I have tried so far:

  1. Switching back and forth between V8 and the previous version -- no improvement
  2. Obtaining the range object in A1 notation vs. Column / Row - no improvement
  3. Running the function separately from any other code -- no improvement

EDIT:

This appears to be related to the issues in this bug tracker with Google Apps Script: https://issuetracker.google.com/issues/222342099

As of March 3rd, 2022 at 5:00 CST this issue appears to have been resolved in regard to the [range].getValue() and the [range].getValues() methods, which has nothing to do with the issue that was referenced in the link when the question was erroneously closed.

In a comment it was recommended that I include a code example so I will elaborate on the code example I had in the original question to simply expand on my code example provided in the original question:

function slow_code() {
var value = SpreadsheetApp.getActiveSpreadsheet().getRange([anyrange]).getValues()
}
Rob
  • 555
  • 3
  • 11
  • show your code so that we can see the context in which it is running, i.e. a `for` loop will drastically slow it down. – Neven Subotic Mar 03 '22 at 20:02
  • @NevenSubotic I expanded on my code example I provided in my original question that you might have missed if you aren't familiar with google apps script, I suppose. I also updated my question with an official issue tracker link since the question you referenced is irrelevant to the issue I was referring to. – Rob Mar 03 '22 at 23:13
  • @NevenSubotic I stand corrected. The second answer in the question did relate to my question it appears and I understand now why you referred to it, although, I do think that the heading of the question that this was flagged as a duplicate for could easily be overlooked by people with my same issue. – Rob Mar 03 '22 at 23:20
  • how large is your range and what kind of data in in there? – Neven Subotic Mar 04 '22 at 08:08
  • I was the close voter. The banner above your question doesn't say "It's a duplicate". It says "This question already has an answer here". And the issue linked is exactly linked in the answer there. When a question is closed, it's your responsibility to look over all the answers and links in that to test, if any of them answer your question. – TheMaster Mar 04 '22 at 08:23

0 Answers0