0

so my app is currently in development so i am the only user and i come across the Firestore Reads Data, which seems to high and now i am wondering why the number of reads is that high.

To test this i calculated every readed Doc that my app querys when i start my App. Also i have some onsnapshot listeners but those triggered only once at the appstart on my test. I came across 67 reads in Total. then i waited a few minutes and looked in the firestore usage tab and their it says i performed 469 reads, which is a big difference.

Now my question is, why is that number so big difference to my calculated number? I am just querying some docs, using the .count() function which counts as 1 read (because i only have 50 docs that are counted) and the onSnapshot listeners also only count a read per updated,added Document on the query.

In the picture attached you can see the Firestore Usage before, The test and after Firebase Usage Test Report

Jonas
  • 9
  • 3
  • Did you keep the Firestore web console open, showing document data? If so, that is where your usage comes from. – Frank van Puffelen Mar 30 '23 at 17:09
  • @FrankvanPuffelen what do you mean? I thought edeting data in Firestore documents in the console is free and doesnt get counted as Reads? Yes kept it open, so you are saying that when i use that it always counts as read? I thought only api endpoints are counted – Jonas Mar 30 '23 at 17:28
  • To show a document (even its ID) in the console, the document has to be read from Firestore. Those are charged document reads and as egress bandwidth. If you make a change to a document, that as to be written, which is a charged document write. --- If something in the Firebase documentation or other materials gave you a different impression, can you provide me a direct link to that source so that we clarify it? – Frank van Puffelen Mar 30 '23 at 17:56
  • @FrankvanPuffelen okay i didnt knew that, i thought the stuff i see in console is free. But when i click on the firestore tab it automaticly loads all the documents of the first collection, is there a way to stop this then because that increases nthe reads massive – Jonas Mar 30 '23 at 18:03
  • Nope, unfortunately not. When I am measuring usage, I typically just switch over to the Usage tab of the console early in the day, and then keep that open while I'm experimenting with usage. – Frank van Puffelen Mar 30 '23 at 23:30

0 Answers0