-
Type:
Task
-
Resolution: Works as Designed
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
we are using this realm kotlin with Atlas device sync , we followed the tutorial made by the device sync team on mongo db website , the sync and everything works well , but the unusual thing is that we noticed the latency is very high in the mongodb logs , is always above 200 ms to 400 ms , whether its a read or a write or even update , what makes me wonder is a friend of mine is using swift sdk to make an ios app ( same as mine ) and latency on his side is about 40 ms only , and that's a huge difference ,
u can see the mongo db logs below :
you will find below an example function that creates a trip document for example ,
we tried also to make the document schema variable names as short as possible to reduce the document size but the latency stayed the same between 200 ms to 400 ms. ,,
we also tried the todo app template provided by mongo team and it gave us same latency , so we are wondering if this is related to the kotlin sdk ,
as a final try , we tried the java sdk and same results .
**realm version : 1.13.0
Android Studio version: Android Studio Iguana | 2023.2.1
Android Build Tools version: 8.3
Gradle version: 8.3**
suspend fun createTrip(pickup: String, dropoff: String) : Trip { val tripReq = Trip().apply { pickUAd = pickup dropOAd = dropoff client = "Hakim" } if (user != null) { CoroutineScope(Dispatchers.IO).launch { realm.write { try { copyToRealm(tripReq) } catch (e: Exception) { Log.d("MongoRepository", e.message.toString()) } } } } return tripReq },,