So I recently converted all of my older scripts to...
# suitescript
e
So I recently converted all of my older scripts to 2.0/2.1 and when doing so, I inquired whether I should be creating separate scripts per function or to use a single script with all functions inside it. The response seemed to be that multiple scripts with 1 function each would be easier to organize and I believe that is still true. But today I did some testing, and as far as load time goes, I found that a single script with all functions inside was 28% faster when it came to page loading. I used Chromes Network tools to record the loading of a Sales Order page multiple times with a single script vs. multiple scripts. Things to consider: I was testing only Sales Order User Event scripts. Which my company has 14 of. So the single script held 14 functions (some beforeLoad, some beforeSubmit, and some afterSubmits) while the comparison was 14 scripts with 1 single function in each. I loaded the same Sales Order 3 times and took the average time to load. Just wanted to share my findings in case any one finds them helpful
👍 1