flamelink / flamelink-js-sdk

🦊 Official Flamelink JavaScript SDK for both the Firebase Realtime database and Cloud Firestore
https://flamelink.github.io/flamelink-js-sdk
MIT License
42 stars 5 forks source link

content.get is very slow with populate: true #199

Open ptreitler opened 2 years ago

ptreitler commented 2 years ago

In my app (Android + iOS) I use content.get() to retrieve data from flamelink.

When I set the populate option to true the call loads for a very long time - by a factor of 10 longer compared to when it's off. The schema in question is quite simple, but it has three referential fields and one media field.

The network inspector shows low amounts of activity with long idle times in between. At times the SDK seems to load only the media metadate - mostly sequentially and with a request time of ~250ms each: image

Is there any way to speed things up here?

Not populating the reference fields would make my app logic quite a bit more complicated, so I'd like to avoid that if possible.

ptreitler commented 2 years ago

Also on Android loading times are significantly longer yet again compared to iOS. Possibly related to this bug in react-native-firebase: https://github.com/invertase/react-native-firebase/issues/5941

ionuts94 commented 1 year ago

Hello @ptreitler ,

Currently we are experiencing the same issue.

We have a react native project and when we run the ios app it takes less than a second to load the content but when we run in on android it takes about 12 seconds to load it.

Did you find a solution to this?