Open sync-by-unito[bot] opened 1 year ago
I have written a benchmark test for our project that imports a "real" dataset into realm: The data model has multiple String, Double, Int, Boolean properties and an embedded RealmList with a range of 0 to 4 elements containing String and Long properties.
RealmKotlin Write 100K Items: 23027 ms Write 1M Items: 149549 ms
realm.write { data.map { item -> copyToRealm(item) } }
RealmJava Write 100K Items: 4031 ms Write 1M Items: 25088 ms
realm.executeTransaction { realm.insert(data) }
(Testing on Android. RealmKotlin 1.11.1, RealmJava 10.17.0)
Any updates for bulk operation?
Please prioritise this feature. Would be of great help for apps with large data.Thanks..
Realm Java has a dedicated API for bulk inserting large amounts of data.
Realm.insert()
andRealm.insertOrUpdate()
.It is currently unclear if that optimization is also needed in Realm Kotlin.
The first step is benchmarking inserting large amounts of data and comparing it against Realm Java.