Firebase retrieval speed test

The plot thickens. Compare these:


84-150 ms to get 50 skus. ← this appears to run sequentially, with the time appearing last on the label, which may matter for some folks.


5-7 seconds


100-170ms (mostly - I had one weird 800ms run) ← this does not run sequentially.

So then I tried combining the two fastest approaches:


This runs in 95-140ms.

I think the issue with cloud variables isn’t fundamentally that they’re slower, but that they run synchronously, so you wait for 50 database retrievals to go one at a time. You can get around that by using the old DB Get block (since it’ll do 50 retrievals asynchronously, which means all at once), or by doing one larger object retrieval (using either method - the difference is probably not significant at this level of testing).

Moral of the story: (until @muneer comes along and proves us both wrong)

  • If you’re getting the value of one node from the database, it doesn’t matter.
  • If you’re getting the value of a whole lot of nodes from the database, looping over cloud variables is slow. Get the parent node and parse it with object blocks OR use the Firebase get block to get a whole bunch of values asynchronously.
4 Likes