firebase - Does DataSnapshot object contains all of its child data? -


how performance of spanshot.numchildren() when have large number of children?

does firebase go through of children count number of children or maintains counter when new child added ?

a datasnapshot contains of data locally in memory. calling numchildren or else on datasnapshot not result in network i/o.

note means should careful when generating snapshots -- if want count number of something, loading large datasnapshot , calling numchildren() more expensive than, example, maintaining separate count of children , updating transaction every time new child added.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -