I found out that listening to document changes will always download the full document over and over.
I have a problem with this in the following scenario: The size of a document is approaching 1 MiB
(which is the limit for document size). Now, there is a number
field that is the only field updating, which is just a few bytes. However, listening to this change (e.g. likes on a post) will always download the full 1 MiB
of data, even though a few bytes would have been sufficient.
I know that I could just move the data that takes up most of the 1 MiB
to a subcollection to a single document, but this would not only be unidiomatic and seem very counterintuitive, but also significantly increase my Firestore bill because I would need two instead of one document reads to retrieve the data initially.
Is there any other way to solve this problem?