javascript - Does Firebase limitToLast() take increasing longer as a child's record count grows? -
i have firebase child named lines
. lines
contains 500k records, each 8 key/value pairs.
when app loads, tries grab last 128 records in lines
using following:
fb = new firebase("https://myapp.firebaseio.com/lines"); fb.limittolast(128).once("value", function(snapshot) { // });
i'm finding app's initial load time getting slower , slower. thing that's changing how many records there under lines
. should expect limittolast()
take increasingly longer number of records under lines
goes up? if so, can try , cull records on time, under impression limittolast()
query grab specified.
should expect limittolast() take increasing longer number of records under lines goes up?
yes. keep reading why is.
if so, can try , cull records on time
that indeed recommended solution.
but under impression limittolast() query grab specified.
it send children matching query client. know children send needs consider of them. while limittolast()
can used reduce bandwidth, don't reduce "disk io" on firebase servers.
i put "disk io" in quotes there, because there many factors involved here. in general: giving database more nodes consider, make slower. or opposite: if give database less work do, done work faster.
Comments
Post a Comment