首页 > 解决方案 > What is more efficient: single node or multi node loading with Firebase/AngularJS 1.x

问题描述

I have one page where I need to load multiple nodes from the Firebase Real-Time Database. The structure is as follows:

/overview/$date/list
/overview/$date/alerts
/overview/$date/other

What is more efficient when using AngularJS 1.x:

标签: angularjsfirebasefirebase-realtime-database

解决方案


Assuming that $date only contains those same three children, and you want all the children all the time, you will probably not measure much of a difference between the two. The single query may be a tad faster. But if you have other children under it that you don't want to read, the single query might be slower, as it's loading more data than you need.


推荐阅读