title: How does firebase child_added really work?
body: <p>I have to read a lot of data from firebase (~3000 children and ~1.5 MB) and it will be good if I can show something that dowloaded to the user. So I decide to use <code>child_added</code> to show each one of them, but it's not work as I expect.</p>
  
  <p>After some experiments, I found it will take ~5 seconds at the first child added and a few seconds go to the end (~3 seconds). if I use <code>value</code> event it will take ~5 seconds to get them all too.</p>
  
  <p>So my question is how firebase child_added really work? Does it just load them all and trigger an event on each one of them or did I miss something?</p>
  
  <p><strong>Update</strong></p>
  
  <p>This is my database structure.</p>
  
  <pre><code>- contacts
    - nw7VoNBw0iLUkb
      - city
      - company
      - email
      - name
      - gender
    - BEu8Yd7ihgxbaF
    ...
  </code></pre>
  
  <p>and some of my code</p>
  
  <pre><code>console.log('start', Date.now())
  firebase.database().ref('/contacts').on('child_added', snapshot =&gt; {
    console.log('add', Date.now())
  })
  </code></pre>
  
  <p>and</p>
  
  <pre><code>console.log('start', Date.now())
  firebase.database().ref('/contacts').on('value').then(snapshot =&gt; {
    console.log('end', Date.now())
  })
  </code></pre>