Hi Suitescript devs, Context: We have a map/reduc...
# suitescript
u
Hi Suitescript devs, Context: We have a map/reduce script that takes items from transaction record using a saved search and then in map stage, loads the item and sets the value and then save it. There are 2 UE scripts that calls a Suitelet which then create/updates custom records. Question: When we load a record in script and then save it, I want to know if every UE Script is executed completely before it moves to the next iteration. i.e if a there are 3 scripts on a record and we load that record in script, will all 3 of scripts will be executed before moving to next line or will it not wait for the UEs to complete and keep on executing? Thanks.
b
its probably easier to just test it yourself outside of the map reduce script
the behavior of the user event scripts will be the same as if you saved the custom record in the ui
u
There are less than 26000 items on transaction which needs to be processed, and it is taking almost 10hrs to complete.
b
what performance do you expect
u
Ok, so what I thought if we load record in script and save it it does not wait for the UE scripts to be complete and just move to next iteration.
b
thats how you ignore errors
u
We expect the script to be complete in max 4 hours.
b
thats probably unrealistic
unless you use suitecloud plus
performance gains can be had if you stop using a suitelet
and stop relying on user event scripts
u
Yes we dont have suitecloud plus
b
basically you want to remove all customizations from your item
then measure how long it takes to save it
you will not get better performance than the time it takes to save an uncustomized record
u
Yes I am currently running the script as it is and then I am going to inactive all the UEs on Item and then run it again to see the results.
Just wanted to confirm the flow of UEs and Scripts In general.
b
user events generally kill performance
user events making http requests to a suitelet is worse
u
Yes after the test run I ll try to move the customization to Map/Reduce completely.
Thanks for the advice it is super helpful.
b
you dont really need to run the entire map/reduce script to figure out how long it takes to save a single item
you can figure out how long it takes to save 1 record, and then figure out how long it would take to do 26000
u
Yes I am only running it for 5 items first