12
Improve read performance from Firestore by minimising the RN Bridge traffic
complete
Miroslav Genov
The read performance from Firestore could be improved by lowering the traffic through the native bridge of RN.
Currently the native code of react-native-firebase is sending documents and changes through the bridge which for large collections causes UI to freeze as it's executed in the UI thread.
This could be improved by keeping documents cache on the JS side and applying only the received changes from the Native Side (Firestore Native Code). This will minimise the traffic through the bridge and will improve the overall read speed.
Elliot Hesp
complete
Elliot Hesp
Hi All - This has now been done for v6. I'll post up some details about the changes in data sizes in the Firestore change log.
Mike Diarmid
in progress
We're already working on improving serialisation performance :) major internals re-write for performance coming in v6.
There's plenty improvement room for optimising traffic and the serialisation structure as well as moving it off to a different thread before we need to think about documents caching.
Can I ask what the experience is like currently on Android vs iOS, are they both causing issues or is it just Android?
Mike Diarmid
For reference, getting a 2mb deeply nested document (extreme scenario) was taking ~10 secs (with UI freezes), after the first pass of optimisations this was down to ~3secs (with NO UI freezes) - so there's improvement coming
Miroslav Genov
Mike Diarmid: I haven't tested it on IOS as my app is targeting only android platform.
Miroslav Genov
Mike Diarmid: Sounds good. I can no wait to test it on my side too.
Miroslav Genov
Mike Diarmid: I don't want to push you, but is there any progress on this functionality?
Miroslav Genov
The request is marked with completed, but which version I have to check?