5
votes

I’m using AngularJS and Firebase.

Goal: I want to display all the data that’s in my Firebase (fixed number of items: ~1600).

Problem: It takes about 10 seconds until AngularFire calls "loaded". The data is about 120 kb and I feel that this could be faster. (e.g. loading the dataset from a .json file takes a second or so).

Is there a way to speed this up?

1
Are you waiting for the loaded event to fire before you start displaying the data to the user? If so, you don't have to. Firebase streams the data to you in chunks, so you can bind to the model in your view and you'll start to see the data populate as it comes in. - Mike Pugh

1 Answers

2
votes

If you don't need to listen for updates to the data, you could use the REST API and just do a $http.get() request to the firebase reference + .json:

$http.get('https://dinosaur-facts.firebaseio.com/dinosaurs.json')
.success(function(dinos) {
    console.log('The dinosaurs are coming!', dinos);
});

Not sure how much quicker it will be with lots of data, but might be worth a try.