We are planning to do a realtime application, We are able to integrate firestore in the app, but, sending data to firestore takes an average of 1.2 seconds using the official flutter plugin for firestore. The speed is not consistent even in good internet connection. We have also checked this with the example app provided with the plugin(cloud_firestore). We have recorded some samples in the sheet attached (https://docs.google.com/spreadsheets/d/1oJBTTbF8654EiFy5whMztWLBSQ8mViRIuE2TLK_ThzA/edit#gid=0)

I have sent this data to record the samples .

      'sentTime': DateTime.now(),
      'serverReceivedTime': FieldValue.serverTimestamp(),

We are building an app where speed is very important.The speed has to be less than at least 100 milliseconds for the data to be received at the firestore end. The data will be very small, like creating a small document.

Please help us to improve the speed. Please comment if you have any doubts with the question or the document attached.

Thanks in advance

Solution 1: Frank van Puffelen

If you are aiming for fast synchronization of (frequent) relatively small write operations, consider using Firebase's Realtime Database over Cloud Firestore.

Firebase has two NoSQL databases: Cloud Firestore and the Realtime Database. Both database's offer realtime synchronization as one of their core primitives, but Realtime Database is often faster and handles small write operations more efficiently (and often cheaper), while Firestore is best if you have relatively big documents, a larger number of (50K-1M concurrent) listeners, and relatively fewer write operations.