How to find slow SuiteScripts in NetSuite
Measure each script’s runs over time and look for the ones that take much longer than that script usually does. Then check what was deployed or what volume changed at that time.
- P95
- 1.9s
- Usual
- 420ms
- Runs
- 84
Start with what NetSuite has
Oracle’s Application Performance Management (APM) Opens in a new tab SuiteApp shows response times for records, scripts and workflows, and the health of processing queues. It is the first place to look for a single slow page.
Script execution logs and the script’s own deployment page show errors for one script at a time.
Find the slow script in CrossCheck
- Open Script Performance for the environment and choose 24 hours, 7 days or 30 days.
- Look at How far runs were from normal. Each dot is one run. 1× is that script’s usual time and 2× is twice as long.
- Open Objects to start from a record type, such as Sales Order, and see the scripts that ran on it.
- Open Scripts to see one script’s runs, and narrow them by date, weekday or hour.
- Compare the period before and after a release to see whether the change made it slower.
What has to be in place
- A completed snapshot, so that CrossCheck knows your scripts.
- Instrumentation. A script reports its runs after a small change to its source. You review the change and choose the scripts.
- Collection. CrossCheck then collects what the scripts report and shows how far the data reaches.
What it does not do
- It does not measure scripts that are locked by a bundle or SuiteApp.
- It does not show runs from before the script was instrumented.
- It does not fix the script. It shows you where to look.
Common causes to check
- Several user event scripts on one record type, each loading the same record again.
- A saved search inside a loop.
- A field that a script writes, which then triggers another script or workflow.
- More lines per transaction than when the script was written.
CrossCheck’s Scripts analysis lists the scripts deployed on each record type and entry point, estimates governance use from the code, and groups scripts that are worth reviewing together.
Which plan includes it
Script performance data is part of the Autonomous Enterprise plan. The code-based Scripts analysis works from snapshots. Contact us for pricing.
Questions and answers
Does instrumentation slow scripts down?
It adds a small amount of work to each run, because the script records its own result. Try it on a few scripts in a sandbox first.
Can I see errors as well as time?
Yes. Failed and timed-out runs are marked, and What went wrong lists them for the period shown.
How is this different from APM?
APM is Oracle’s tool and covers page and record response times too. CrossCheck keeps script runs next to the releases and dependencies of the same account.
Last updated · Changelog
