Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Realm-Kotlin open is too slow compares to Realm-Android #908

Open
thuannv opened this issue Jun 25, 2022 · 2 comments
Open

Realm-Kotlin open is too slow compares to Realm-Android #908

thuannv opened this issue Jun 25, 2022 · 2 comments

Comments

@thuannv
Copy link

thuannv commented Jun 25, 2022

I was experience about the slow startup time by opening Realm Kotlin instance. The more schema classes is added to the RealmConfiguration, the more is slow start.

I experience that on my same android phone Samsung A02s, open a Realm Kotlin instance took 4362ms while Realm Android took just 58ms. I tried reducing from 34 schema classes to 5 scheme classes, it took more than 1000ms to open a realm instance. It hugely reducing opening time when I reduced number of schema classes. Even though, it still took a lot more time in comparison to Realm Android.

As, I am using Kotlin Multiplatform Mobile for my MoMo app - a number one E-Wallet Application in Vietnam, with more than 30 millions of users, It is hugely impacted to our application cold start, slowing down the time to interaction. Hope Realm-Kotlin team tries figuring out this issue and solving it to make Realm-Kotlin more powerful.

I'm so thankfully and highly appreciate for your endeavor.

@rorbech
Copy link
Contributor

rorbech commented Jun 29, 2022

Thanks for your feedback. We have mainly focussed on API surface until now, but we are aware of areas for optimization and are starting to address them.

Regarding your use case, with Realm Kotlin you can now open and share your realm instance across thread. This should make it easier to centralize this in an asynchroneous manner to unblock UI operations and initilize things when the realm is ready.

@kzotin
Copy link

kzotin commented Oct 17, 2024

Hi
Do you know if the issue still relevant?
Does cold start depend on schema size?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants