Firebase Boot Performance

A simple console synchronization shows that fb loads much slower than desired (only 50 chat elements).

load: 171.226ms
fbload: 1723.570ms 

load: 182.672ms
fbload: 2143.836ms

The normal load from my mongodb and fbload is firebase. Despite the fact that my mongo is not denormalized, an order of magnitude lower.

  • Is there something I can do to improve performance?

  • I am using angularfire and I can download the source code from my own database and then replace it with fb data. For this solution, is there some way I can get the fb data to sync and bind to existing dom elements to avoid redrawing the layout?

code Here's how I download fb time.

console.time('fbload')
$scope.chatLog = $firebase(fb.child('view/r/' + id).endAt().limit(50));
$scope.chatLog.$on('value', function () {
    console.timeEnd('fbload')
})

Edit:

, websocket. Firebase xhr - . . ?

+1

Source: https://habr.com/ru/post/1540298/


All Articles