Firestore snapshot listener

89 views
Skip to first unread message

Kane Kim

unread,
May 1, 2020, 2:41:52 PM5/1/20
to Firebase Google Group
If document is partially updated what is sent over the network?
Is the whole document sent or only updated fields?

Should we try to keep updates smaller or it doesn't matter for listeners?

Thanks.

Kato Richardson

unread,
May 4, 2020, 2:23:48 PM5/4/20
to Firebase Google Group
Hi Kane,

When using a listener, deltas are sent. 

For performance, if you are writing fairly big docs, then smaller would be better. For fairly small byte counts, it probably doesn't matter much. For pricing, you pay by the read/write and for bandwidth, so it would take some optimizing for your app's characteristics to find the optimal route.

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/9feb2a2b-b4a1-4a57-8ae1-8ba1d6048723%40googlegroups.com.


--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Kane Kim

unread,
May 4, 2020, 9:46:12 PM5/4/20
to Firebase Google Group
Got it. Thanks!


On Monday, May 4, 2020 at 11:23:48 AM UTC-7, Kato Richardson wrote:
Hi Kane,

When using a listener, deltas are sent. 

For performance, if you are writing fairly big docs, then smaller would be better. For fairly small byte counts, it probably doesn't matter much. For pricing, you pay by the read/write and for bandwidth, so it would take some optimizing for your app's characteristics to find the optimal route.

☼, Kato

On Fri, May 1, 2020 at 11:41 AM Kane Kim <kane....@gmail.com> wrote:
If document is partially updated what is sent over the network?
Is the whole document sent or only updated fields?

Should we try to keep updates smaller or it doesn't matter for listeners?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fireba...@googlegroups.com.

Kato Richardson

unread,
May 5, 2020, 12:41:46 PM5/5/20
to Firebase Google Group
Hm, a clarification since I didn't read your question closely enough. When I said "deltas are sent" I was referring to listening on a collection (not a doc). In that case, only changed docs are sent. I don't think that when listening on a doc we do any sort of deltas; we just send the entire doc. The rest of my reply is still accurate.

☼, Kato

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/07db780a-be4e-49e4-8a8b-5b3b3ac661a2%40googlegroups.com.

Kane Kim

unread,
May 5, 2020, 4:16:12 PM5/5/20
to Firebase Google Group
Ah, makes sense now, I was under assumption that only partial doc would be sent (delta within the document). Thanks for the clarification.
Reply all
Reply to author
Forward
0 new messages