So the Promise.all() does make out lives simpler.
But is there any limitation on the number of promises that can be added to 'Promise.all()'
i.e. Is there any limitation on the size of the array 'promises' in the following code:-
const promises = [];
snapshot.forEach(doc => {
**some code**
promises.push(
docRef.set(newData, {merge: true})
);
});
return Promise.all(promises);
----------------------------------------------------------------------
Further Clarification:
I'm using this Cloud Function to update all users on my App.
Model DB Structure: Users/userId
Since the number of users is small, I'm not facing any issues for now.
But, as the number of users grows I'm concerned if I may hit some limits..
And as per the issues pointed out by:
1) david - browser's maximum concurrent web requests slowing things down
2) herohtar - limited memory available to your function
These two issues suggest that, there might as well be some limits.
So, can anyone point to the official doc for the same or Anyone from the Firebase team, if you guys can throw some light on the same.