[cloud_firestore] Does cloud_firestore optimize duplicate snapshot listeners? #3941
Unanswered
kaiserschmarrn0
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is not a feature request, just important information for app design.
If I open a duplicate snapshot listener will cloud_firestore check for an existing data stream and attach the listener to that stream?
A quick test suggests no, since neither stream objects or references are the same.
Code:Output:
I couldn't find anywhere in the source that this optimization is made (it might be part of the android library or something, in my case), but its still possible that it happens and cloud_firestore just creates extra reference/stream objects for some design reason.
Beta Was this translation helpful? Give feedback.
All reactions