🐛 [Cloud_firestore] Firestore query snapshot with changes only #11631
Labels
platform: all
Issues / PRs which are for all platforms.
plugin: cloud_firestore
type: enhancement
New feature or request
The current querySnapsot returns the list of all documents that match the query every time that a change occurs. For streams that return a large number of documents this an be an issue, as well as inefficient.
For instance, our use case requires us to keep a local cache of all documents returned by a query. When a single document is updated, querySnapshot will send a list all documents matching the query along with a list of the documents that were changed. All we need is that list of changes to update our local cache.
Since we have such a large number of documents in our streams, the querySnapshot was leading to issues with the method channels. We were getting ANR, and crashes while trying to pass data from the java to dart. This change has completely fixed these issues for us.
Pull request for suggested implementation found here:
#11539
The text was updated successfully, but these errors were encountered: