We are developing an app in dart wherein we need to fetch around more than 50K rows at once (doing it when app loads) and then data will be used in other sections of app for further calculations. We are using Firebase Realtime database and we are facing some serious performance issues.
Its currently taking somewhere around 40 seconds to load 50K rows(currently using free database version, not sure if that would the reason), but we have also observed that when multiple users uses the app, it starts to take around 1 minute 20 sec to load 50K rows and Peak goes to 100%.
Can you please suggest how can we improve performance in firebase realtime database ?
If I break the data in two collection but keep it in same JSON file, would that help ?
Can it be because we are using currently free database version for testing ?
We have tried creating indexes in "Rules" section on 1 Key field but that did not help much. Is there any way we can improve this ?