SuiteScript Performance Rescue + Event Layer
Delivered by Forward Within Consultancy (FWC)
Outcome Heaviest SuiteScript report: 15 seconds to 0.25 seconds (best case on one script, not an average).
The heaviest SuiteScript reports were hitting governance limits, and finance and HR still worked from batch data that was hours old
The Problem
Governance Limits and Batch Data, on a System Already Live
This health and insurance services provider ran project and claims work through NetSuite, with over USD 20 million a year flowing through it. The heaviest SuiteScript reports ran into NetSuite's governance limits, and finance and HR still worked from scheduled batch pulls.
Original Workflow
- 1. Heavy SuiteScript reports hit governance limits and take 15 seconds or more per run
- 2. Finance and HR pull a bulk batch on a fixed schedule and see hours-old numbers
- 3. A script that times out fails with no clear alert
- 4. Each new downstream system means another point-to-point script in NetSuite
Our Approach
Fix the Scripts First, Then Make the Data Move in Real Time
First, each script had to stay inside governance limits: the right script type for the job (a batch process belongs in Map/Reduce, not a Suitelet), with redundant record loads, uncached data and repeated searches removed. Then our NetSuite toolkit gave the account webhooks, so finance and HR stopped waiting for the batch.
Caveats
- A faster script does not raise NetSuite's governance limit; it uses less of it per run
- Up to 60x faster (15 seconds to 0.25 seconds) on the heaviest script; across our projects the average speed gain is 15%
- The 20-minute bulk pull stayed as a fallback instead of being switched off on day one
The Solution
SuiteScript Rewrites, Then the Same Event Layer
We profiled the heaviest reports and rewrote them to call N/record, N/search and N/query only where each is needed, instead of looping through records and unoptimised saved searches. The toolkit then added event capture, emission and subscription management for real-time delivery.
Results
Faster Scripts, Then Real-Time Data
Related Reading
Where this applies
Have a Similar Challenge?
An ERP Health Check is a two-day review of an ERP that is already live, ending in a written report that ranks its defects by risk and gives a quote for each quick win.
Book The ERP Health Check, RM 4,000