I am using this
exports.countposts = functions.database.ref('/rooms/{roomId}/posts').onWrite((change, context) => {
It works! As soon as data is posted (in 99% of cases POSTed) onto the "array" posts
(it is an array, I guess in the firebase database world no such exist), this function is called and all is well.
However when the array posts
get big, somewhere above 10000 (ten thousand), the function specified silently does not get called at all. I get no error logs. I am assuming/guessing this is a performance issue - when the number of children inside posts gets higher, the execution time of each function gets longer - more or less linearly.
What is the problem here, how can I mitigate this?