Firestore extra reads on reload and hard refresh

  1. SDK Version: 3.19.2
  2. Platforms(Android/iOS/web/all): all

I am building a mobile app using Firestore. I’m noticing that when I do a hard refresh (and maybe even a hot reload) that it appears to cause more document reads from the Cloud Firestore database.

I’ve read some stackoverflow questions that indicate there are likely no reads on a hot reload, but hard refreshes of the simulator cause the snapshot listener to disconnect and reconnect initiating a fresh set of reads.

Is that what’s happening? Is there a way to stop extra reads on hard refresh?

Currently I’m using Firestorter as a store, and it claims to handle caching, but the reads seem too high. Though if a hard refresh causes the snapshot listener to disconnect and reconnect, maybe that’s the problem?

Hey @mosleyjr, it looks like you listed your expo-cli version rather than the SDK version of your project which should be 36-39. (Also, your cli version is quite out of date so I would suggest updating that as the latest is 3.28.5.

As for the reads behavior, I would try to see if you can replicate the behavior with a newly created and minimal implementation to see if it’s project specific or not. As for Firestorter, unfortunately we can’t provide support for third-party libraries.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.