Google Spreadsheet脚本的随机缓慢 [英] Random slowness of Google Spreadsheet scripts

查看:63
本文介绍了Google Spreadsheet脚本的随机缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们一直在努力编写脚本来管理Google Spreadsheet. 整个项目对飞蛾的工作无懈可击,但是在最后一周,整个脚本随机变得极其缓慢. 电子表格数据中的所有函数调用(getLastRow,getLastColum,getRange)都需要10秒才能完成.没关系,范围包含单个单元格或100.

We’ve been working on the last moths to a scripts to manage a Google Spreadsheet. The whole project worked flawlessly for moths, but in the last week randomly the whole script become extremely slow. All the function call from spreadsheet data (getLastRow, getLastColum, getRange) take 10s to complete. In doesn’t matter it the range contains a single cell, or 100.

该脚本不会引发任何配额异常( https://developers.google.com/apps-script/guides/services/quotas#current_limitations ),所以我认为这不是问题.速度缓慢地每天随机地打到电子表格上,然后几个小时后,问题似乎减轻了而不是消失了,以后再回来.

The script doesn’t throw any quota exception (https://developers.google.com/apps-script/guides/services/quotas#current_limitations) , so I think that this can’t be the problem. The slowness hit the spreadsheet randomly each day, then a few hours later the problem seem to reduce than disappear, to come back again later.

我们进行了一系列新的测试:我们创建了包含所有数据和脚本的电子表格的副本. 因此,在新的电子表格上,我们具有相同的脚本,相同的数据集,一切正常.在旧版本上,速度仍然存在.

We've made a new serie of test: we've created a copy of the spreadsheet with all data and script. So we've got the same script, same data set, on the new spreadsheet everything works fine. On the old one the slowness is still present.

感谢您的帮助

推荐答案

问题 6102 :getLastRow()有时需要极高的运行时间

Issue 6102: getLastRow() sometimes requires extremely high runtime

问题64931371 :作为openById,getLastRow的运行速度非常慢(5/10秒)

Issue 64931371: function as openById, getLastRow very slow (5/10 seconds) intermittently

为问题加注星标,并在测试摘要中添加评论.

Star the issue and add a comment with the summary of your tests.

这篇关于Google Spreadsheet脚本的随机缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆