pretty sure I know the answer, but just wanted to ...
# suitescript
d
pretty sure I know the answer, but just wanted to confirm ... if a map reduce is hitting governance, there's nothing I can really do, besides try and split it up further?
s
Which stage is hitting limits?
d
reduce() ... sorry, I badly phrased the question
it's not like I'm doing much in each loop, there's just alot of them
s
What are you doing in the reduce stage?
d
looping through records grouped together by the map(), fetching data and compiling it all together
s
You can try fetching data in the map stage to remove the need to loop and fetch in the reduce
d
yeah I do fetch some in the map already, I might be able to offland a little bit more
s
that's all I can think of
d
thanks
s
and just make sure to use record.lookupFields when possible over record.load
or if searching, you can try aggregating into a single search if possible
There are lots of little tricks for reading data in bulk to work around limits