title: Firebase usage stats seem inflated, and I'd like to understand why the following observable results in upwards of 70 reads
body: <p>Since Google has decided to charge for just about every single aspect of Firebase Firestore and Firebase Cloud function usage, I'd like to make every effort to ensure our code executes queries to Firestore as efficiently as possible.</p>
  
  <p>I am in the process of doing some isolated tests, which I will post here as updates, to try and determine whether or not Firebase's usage statistics are accurate, but at first glance, something does not seem right.</p>
  
  <p>How does the following observable, which gets instantiated inside of the constructor of my authentication service in an angular application at app launch, result in upwards of 70+ read requests?</p>
  
  <p>I can confirm that no changes occurred to the data prior to instantiating this instance of this observable nor after.</p>
  
  <p>We had waited for the usage to settle, and after approximately an hour of zero usage, we launched 1 instance of our application which initiates the following observable:</p>
  
  <pre><code>            this.auth$ = this.firebaseAuth.authState.pipe(
                switchMap((user) =&gt; {
                  if(user) {
                    console.log("[auth service] user update:", user);
                    return this.firestore.doc(`users/${user.uid}`).valueChanges();
                  } else {
                    console.log("[auth service] user not signed in");
                    return of(null);
                  }
                })
              );
  </code></pre>
  
  <p>Once the application had loaded, we immediately closed it.</p>
  
  <p>After approximately 5 minutes, we checked the usage statistics in the Firebase console and saw 70+ read requests added to our usage. Why?</p>
  
  <h2>Update 1</h2>
  
  <p>As per comments below, and just as we had in-fact suspected, having the Firebase console open in a browser will result in additional strikes against our quota, however, this still does not explain 70+ read requests as a result of our initial test. Or, does it? How many reads will a typical database accrue from a view in the console? Without navigating around? Does it load data that is not in view? For example, a collection that is not selected?</p>