Long time to load data from the database when you first load the app

470 views
Skip to first unread message

Саша Цвигун

unread,
Dec 5, 2016, 10:24:07 AM12/5/16
to Firebase Google Group
I use feyrbeys to store data in my application. But when you first load the application data is a very long time to load from the database. I have to wait for 5 - 6 minutes and sometimes more. I do not fully understand why this is happening, please, who is more competent to tell what is the problem ..
I write for iOS on language Objective - c, here is my code...

    self.ref = [[FIRDatabase database] reference];

    [self.ref keepSynced:NO];

    

    [self.ref observeEventType:FIRDataEventTypeValue withBlock:^(FIRDataSnapshot * _Nonnull snapshot) {

        

        self.fireUser = [TSFireUser initWithSnapshot:snapshot];

        [self configureController];

        

    }];


Thank you!

Kato Richardson

unread,
Dec 5, 2016, 2:38:28 PM12/5/16
to Firebase Google Group

Hi Саша,

How much data is being downloaded? Generally, it takes as long as the bytes take to travel over the internet. However, it could be a UI update issue as well.

The random snip of code you’ve included here doesn’t really show what’s going on with your help and won’t help us get any closer to a solution. But you could start by turning on debug logging (samples below) and seeing what’s going on behind the scenes. And then either using a debugger or adding some logging to your iOS code to compare the times and see where the bottleneck is.

JS:  firebase.database.enableLogging(true);
iOS:  [FIRDatabase setLoggingEnabled:YES];
Android:  FirebaseDatabase.getInstance().setLogLevel(Logger.Level.DEBUG);

Identifying the bottleneck would be the first step.

☼, Kato


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/23865f1f-83b4-4b42-af70-91fa8032b764%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Reply all
Reply to author
Forward
0 new messages