-
I place readStream inside the loop as suggested by the author of this library. I experience high download costs in Firebase billing. I am wondering if readStrean is the reason for high data download. As it is inside the loop, it is called many times per second. Even a small data download for each call, the impact can be big. Does anybody know? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Because you don't understand what is sever event streaming. The readStrean function is only polling check the data available from the server without sending anything to sever and it's impossible to cause your high data bandwidth. Only when changes in sever streaming node occurred, the data will be pushed to client, and this data will read out by readStream. The download bandwidth is due to you use get/set/push/update too frequently in loop instead of readStream. |
Beta Was this translation helpful? Give feedback.
Because you don't understand what is sever event streaming.
The readStrean function is only polling check the data available from the server without sending anything to sever and it's impossible to cause your high data bandwidth.
Only when changes in sever streaming node occurred, the data will be pushed to client, and this data will read out by readStream.
The download bandwidth is due to you use get/set/push/update too frequently in loop instead of readStream.