snappydb

What is the most efficient way to store long list of Objects in Realm?

寵の児 提交于 2019-11-28 08:31:16
I'm trying to compare Realm with Snappydb ( This is my repo for those who would like to have a look at benchmark). I guess my way is wrong, as store-to-db time takes super long time in Realm in compare with Sanppydb. Benchmark shows following result. As you can see in the image, Realm is around 100-200 times slower than Snappydb. What I'm doing is creating 10,000 objects first and then storing them into the db. So, in my code I store a Booking object in this way (there is a for loop that iterates 10,000 times): public void storeBooking(final Booking booking) { mRealm.executeTransaction(new

What is the most efficient way to store long list of Objects in Realm?

≯℡__Kan透↙ 提交于 2019-11-27 02:15:09
问题 I'm trying to compare Realm with Snappydb (This is my repo for those who would like to have a look at benchmark). I guess my way is wrong, as store-to-db time takes super long time in Realm in compare with Sanppydb. Benchmark shows following result. As you can see in the image, Realm is around 100-200 times slower than Snappydb. What I'm doing is creating 10,000 objects first and then storing them into the db. So, in my code I store a Booking object in this way (there is a for loop that