ANS-1374 · SUITESCRIPT DEVELOPMENT
What is the Performance Impact of NetSuite Script Log Levels?
Understanding the performance overhead of NetSuite script execution logs at different logging levels is crucial for optimizing script efficiency.
Short answer
NetSuite script execution logs significantly impact performance. Debug-level logs, when active, can add substantial overhead (e.g., 723 ms for 200 logs). Switching to Audit level dramatically reduces this to a minimal impact (e.g., 20 ms for 200 logs), while commenting out logs entirely eliminates overhead.
Scenario
NetSuite script developers often need to understand the performance implications of various logging configurations. Excessive or improperly configured execution logs can introduce significant overhead, impacting script execution times and overall system performance. This scenario explores the specific time costs associated with different log levels.
Solution
Tests were conducted to quantify the performance impact of script execution logs. A script containing 200 execution logs with debug type was run under three distinct scenarios, with results averaged over six repetitions for each:
- When the script's log level is set to Debug and the log executions are NOT commented, the average time observed for processing 200 execution logs was 723 ms.
- When the script's log level is set to Debug and the log executions are commented, the observed time was 0 ms.
- When the script's log level is set to Audit and the log executions are NOT commented, the average time observed for processing 200 execution logs was 20 ms.
Expert NetSuite Support
Need help with this NetSuite issue?
SuiteScript Development consulting and configuration support
