This looks like your doing a hell of a lot within ...
# suitescript
k
This looks like your doing a hell of a lot within get input data. I would consider moving this around so some is b3ing done in map then some done in reduce.