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

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

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

uitableview - Create and use custom prototype table cells in xamarin ios using storyboard -