Is Firebase limitToLast () limited to grow longer as the number of child records increases?

I have Firebase with a child name lines. linescontains about 500 thousand records, each of which contains eight key / value pairs.

When my application loads, it tries to capture the last 128 entries in lines, using the following:

fb = new Firebase("https://myapp.firebaseio.com/lines");
fb.limitToLast(128).once("value", function(snapshot) {
  // do something
});

I find that the boot time of the application bootstrap is getting slower and slower. The only thing that changes is the number of entries in lines. Should I expect it limitToLast()to increase longer as the number of entries in linesincreases? If so, I can try to drop the records over time, but I got the impression that the request limitToLast()will only capture what is indicated.

+4
source share
1 answer

Should I expect limitToLast () to increase longer as the number of entries below the rows increases?

Yes. Keep reading why this is so.

If so, I can try to drop the records over time.

.

, limitToLast() , .

, . , , . , limitToLast() , " IO" Firebase.

"disk IO" , . : , . : , .

+6

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


All Articles