0

I have a node in a realtime database which contains 100 objects. For a particular use case, I need to download specific objects (50-90 objects) from the collection.

Should I download each object separately using singleValueEventListener on each object or should I download the whole collection at once and use only the objects required.

Would the multiple singleValueEvenyListeners induce a lot of overhead bandwidth, to the extent that downloading the whole collection at once using only one singleValueEventListener cost me less download bandwidth?

Mostafa Arian Nejad
  • 1,278
  • 1
  • 19
  • 32
  • You are speaking about a collection in Cloud Firestore? – Alex Mamo Mar 04 '18 at 13:56
  • 1
    https://firebase.google.com/docs/database/admin/retrieve-data please read about addValue..... event – Zaid Mirza Mar 04 '18 at 13:57
  • "Would the multiple singleValueEvenyListeners induce a lot of overhead bandwidth...?" Nope, not really. See http://stackoverflow.com/questions/35931526/speed-up-fetching-posts-for-my-social-network-app-by-using-query-instead-of-obse/35932786#35932786 – Frank van Puffelen Mar 04 '18 at 15:14

0 Answers0