Why does performance degrade when a serverless function exits without completing Promise.all() successfully in Firebase Cloud Function?
In the past, I used to run Promise.all() without await in Cloud Function.
Then, this would cause the Cloud Function to exit without waiting for Promise.all() to complete.
As a result, my Cloud Function sometimes worked correctly and sometimes did not.
This is problem, so we fixed it to await Promise.all() to wait for all the processing to finish.
Then, the Cloud Function, which used to take several minutes to complete, now completes in a few seconds.
I am curious about this issue and would like to understand it. Why is it that when I fix all async process to wait, the function completes immediately?
Thanks.