KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Working on a Google Sites site, which takes data from a spreadsheet and builds several charts dynamically, I mentioned that Google Apps Script works quite slow. I profiled the code and optimized it, by using the Cache Service, where it is possible. After optimization the charting code takes approx. 3 secs (2759 ms is one of the fastest times, which I have ever seen) to draw 11 charts having 127 rows. And this time is for the case when all data are placed to the cache. The 1st execution time, which fetches data from the spreadsheet and places them to the cache, is around of 10 sec. The profiled code required sufficient time (tens of milliseconds) in simple places. To measure the GAS performance, I wrote a very simple procedure and executed it in the GAS environment, as deployed web application, and in the Caja Playground . Also I submitted an issue to the GAS issue tracker. Eric Koleda reasonably mentioned , that it is not correct to compare a server code with a code running on a client. I rewrote the benchmark code and here are the results. The details and explanations are the following. Engine |List To Map|Adjust|Quick Sort|Sort|Complete| GAS | 138| 196| 155| 38| 570| rhino-1.6.5 | 67| 44| 31| 9| 346| spidermonkey-1.7| 40| 36| 11| 5| 104| GAS - a row containing the execution times of different functions ran on the GAS engine. All the times are in milliseconds. The G
Tags (comma-separated)
Save Edits
Cancel