Here, I would like to report the process costs for searching values in Spreadsheet using Google Apps Script (GAS). When the values are searched in Google Spreadsheet, the following 3 patterns can be considered. Ref
- Retrieve all values using
getValues, and the values are searched from the retrieved array.
- Use TextFinder.
- Use Query language.
TextFinder is a relatively new addition to Google Apps Script with was released on April 5, 2019.
TextFinder is part of the Spreadsheet Service and provides methods for finding or replacing text within a range, sheet or spreadsheet. There have been some reports on Stack Overflow that the
TextFinder against other techniques. Click through to the source for the results and code for running the experiment.
Source: Benchmark: Process Costs for Searching Values in Spreadsheet using Google Apps Script
Member of Google Developers Experts Program for Google Workspace (Google Apps Script) and interested in supporting Google Workspace Devs.