Reputation: 153
So for example, I fetched 100 collection from Firestore.
If I console.log the data from Firestore twice, does it still read as 100 or 200?
Upvotes: 1
Views: 42
Reputation: 598847
A document read is charged when the document is read on the server on your behalf.
So:
data()
on a document snapshot you are not charged, so you can call it multiple times without getting charged.So: loading a DocumentSnapshot
may be charged, depending on whether it requires a read from/on the server. Subsequently calling data()
on that snapshot is not a charged operation.
Upvotes: 2