Resolved the delay. It was related to realtime listeners that were updating while the cloud function was in progress. After pausing the realtime listeners, the response is fast, even with a data large payload.