简体   繁体   English

未使用的模块或功能是否会影响SuiteScript的执行速度?

[英]Will the unused modules or functions affect the execution speed of SuiteScript?

A script on NetSuite as the following, it is a Client Script which written in JavaScript with the API 2.0 of SuiteScript: NetSuite上的脚本如下所示,它是一个客户端脚本,用JavaScript编写,带有SuiteScript的API 2.0:

define(['N/currentRecord','N/record','N/search'],
    function(currentRecord, record, search) {
         for(i = 0; i< 10000; i++) {
                ...
         }    
         function a() {}
    }

    return {
        pageInit: pageInit
    };
});

But there is nothing about the included modules(N/currentRecord, N/record and N/search) in the script. 但是脚本中包含的模块(N / currentRecord,N / record和N / search)没有任何内容。

Will the unused module inside the define() function affect the execution speed of SuiteScript or NetSuite? define()函数中未使用的模块是否会影响SuiteScript或NetSuite的执行速度?

And how about the unused function a()? 那个未使用的函数a()怎么样? Will it affect the performance of this script? 它会影响这个脚本的性能吗?

Technically, yes, both will affect the performance, but it should be minuscule. 从技术上讲,是的,两者都会影响性能,但应该是微不足道的。 I highly doubt it will be at all noticeable or consequential. 我非常怀疑它是否会引人注目或具有重要意义。

So many other things in NetSuite operate on the order of seconds (searches, loading records, loading pages) that a few extra micro- or milliseconds to load a library or define a function will be completely inconsequential to the user's experience. NetSuite中的许多其他东西按 (搜索,加载记录,加载页面)的顺序运行,加载库或定义函数的额外微秒或毫秒将对用户的体验完全无关紧要。

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

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