0

Does Firebase has some kind of batching for retrieve requests?

For instance, in this api top stories request returns up to 500 ids, which means that in order to display them all in a list I need to call `addListenerForSingleEvent" 500 times.

Maheshwar Ligade
  • 6,709
  • 4
  • 42
  • 59
defhlt
  • 1,775
  • 2
  • 17
  • 24
  • to get your question right, you want to retrieve only a few of the ids? like say the first 100 or something? – hello_world Jul 14 '16 at 07:20
  • Let's say first 100 or maybe all 500. What I'm worried about is does it mean I'll be creating respectively 100 and 500 requests to firebase server – defhlt Jul 14 '16 at 07:24
  • looking at the api, that seems to be the case, so yes. for each id you receive, you'll have to retrieve the data individually. – hello_world Jul 14 '16 at 07:29
  • 1
    Creating many requests to the Firebase database is typically not a big performance problem, because the client pipelines all those requests over a single web socket connection. 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 Jul 14 '16 at 14:51

0 Answers0