Ron
01/03/2025, 4:38 PMCeligo AI
01/03/2025, 4:38 PMAI generated answer (using internal Slack threads):****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ****** To speed up a script in NetSuite, you can consider the following best practices: 1. Reduce the number of scripts: Aggregating functions into one script file can help to speed up the execution. 2. Disable unnecessary scripts: If you have a Map/Reduce script that updates item records and other User Event (UE) scripts are slowing it down, you can unselect Map/Reduce on the Context Filtering tab of your UE script deployments. 3. Use concurrency limit: If your account is using multiple SuiteCloud Plus processors, take advantage of using the concurrency limit and set it to the max limit. 4. Use SuiteQL instead of search: If you are using search to load/create the results, change it to a SuiteQL query to load the dataset faster in getInputStage. 5. Add logic inside server restart condition: This is a good practice to ensure that if the server restarts or something breaks due to an unexpected error, you can process the results from where it got stopped instead of processing it from scratch again. 6. Set buffer limit value as low as possible: This is to avoid processing duplicate keys again if there is any interruption in the middle of processing the keys. 7. Avoid unnecessary load records: This is time-consuming, choose instead to make a search/SuiteQL, avoid saving the record and submit the necessary fields instead. 8. Convert declarative codes to imperative: Consider converting some declarative codes to imperative such as using for loops instead of map/reduce/filter. This can save significant processing time. Remember, with NetSuite, if your code hits the database, saving a few seconds on a process that takes many minutes or hours to run is an anti-pattern. It's more important to write efficient and effective code.
Celigo AI
01/03/2025, 4:38 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.817482591
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.812371612
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.808805108
Celigo AI
01/03/2025, 4:38 PM