Using the “Page Time Details” APM tool report, we ...
# performance
k
Using the “Page Time Details” APM tool report, we are seeing several slow “Edit Sales Order” operations due to long-running “Client Init” (see screenshot below). According to Netsuite documentation, “Client Init” is: “The amount of time used by client scripts to run pageInit functions. This function contains user-defined client scripts triggered by the pageInit client event type and standard pageInit operations. If the pageInit function triggers other client scripts as part of pageInit, the timing is recorded.” When looking at the “Page Time Details” in the Netsuite APM tools for that operation, it only shows the server-side “SuiteScript and Workflow Details” (highlighted in red), which only accounts for 1.467 seconds of time. According to the details below, the 499 seconds is due to the “Client Init” time. The Netsuite APM tool does not seem to allow us to trace into the client-side scripts that run as part of “Page Init”. I am looking for visibility into the time it is taking to run each of the client-side scripts. Any tips on accessing that performance information would be greatly appreciated. Thank you in advance.
d
Most likely this is just 1 script that is calling an external server, and that server is unresponsive. Client scripts can actually be tracked if you know Javascript. The issue is you dont know which script is the one that has issues. To see which script is the offending script, go to the Scripted Records page for Sales Orders and open every single Client Script. On the first line of each
pageInit
function, type
console.log('pageinit start for ___ script")
and on the final line of each
pageInit
function, type
console.log('pageInit completed for ___ script')
. now all you need to do is load a sales order in Edit Mode and see which script started but did not completed.