I\'m using Firebase in my android app, and I\'ve noticed that the app use a lot of bandwidth. I execute only read in the lower nodes childs like stated in the best practise
The bandwidth counts the amount of data that you upload and download. It's really as simple as that.
If you have defined an index on internalKey
, then Firebase will filter the data on its servers and return only the elements matching the condition.
However, if you don't have an index on internalKey
, all the data will be downloaded to the client and the client will then do the filtering. You should also see a warning about that in logcat iirc.
When you see large bandwidth usage, I recommend enabling debug logging (Firebase.getDefaultConfig().setLogLevel(Level.DEBUG)
) and checking if the traffic in logcat matches your expectation.