简体   繁体   English

GAS Web App的保存和加载时间长

[英]Long Saving and Loading Time with GAS Web App

I've been running into this problem with odd regularity. 我一直在以奇怪的规律碰到这个问题。 Code working fine, and then it starts taking a couple minutes to save or load. 代码工作正常,然后开始需要花费几分钟来保存或加载。 It's about 2000 lines, so only on the larger-side of average. 它大约有2000行,因此仅在较大的一侧。 Well this problem found its way into my day today again, and I finally found the cause. 好了,这个问题再次出现在我今天的生活中,我终于找到了原因。

It turns out that all of my "slow code" had been copy and pasted, generally when I've used Select All . 事实证明,通常在使用全Select All时,我所有的“慢代码”都已被复制并粘贴。 I've been doing this as I deploy the apps to coworkers and the like, causing a far amount of frustration. 在将应用程序部署到同事之类的过程中,我一直在这样做,这导致了很多挫败感。

I know this may sound obvious, but it seems the best practice for installing apps into other accounts is to share the script at viewer level and then make a copy. 我知道这听起来似乎很明显,但是将应用程序安装到其他帐户中的最佳做法似乎是在查看者级别共享脚本,然后进行复制。

I've also gone back to other slow code, tracked down a good version and made a copy and updated bit by bit. 我还返回了其他慢速代码,找到了一个好的版本,并进行了复制和一点点更新。 Slow code now fast. 现在,速度较慢的代码很快。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM