realm-java: Realm is too slow on Android first call when compared to iOS
Goal
What do you want to achieve? Faster return for realm.getInstance() call the first time it is executed
Expected Results
I am noticing the iOS Realm is much faster at returning the Realm Instance the first time it is called, significantly faster (with the same schema setup).
Actual Results
I am noticing it takes upwards of 1 second on the Samsung s8. On some devices it takes up to 8-9 seconds.
Steps & Code to Reproduce
Describe your current debugging efforts. Please run this (https://github.com/abhi-scenedoc/realmTest) sample project that I have put together which displays the results (time taken is ms).
Code Sample
long startTime = System.currentTimeMillis();
Realm realm = Realm.getDefaultInstance(); //first time it's called after application is opened
long result = (System.currentTimeMillis() - startTime);
Log.d(REALM, "total time = " + result);
Version of Realm and tooling
Realm version(s): 3.7.2(testing) and 3.3.1 (in our production app)
Realm sync feature enabled:no
Android Studio version: 2.3.3
Which Android version and device: Samsung S8 - Android 7.0
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 32 (16 by maintainers)
+1
This is a very concerning issue for us to deal with. Are there any updates in regards to this? We have a major customer who have indefinitely postponed going live on our production because of this challenge.
Any update on this? I need a more comparative result to Realm for iOS.