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

First constructor call of RealmConfiguration.Builder(realmClasses) takes 5+ seconds #1855

Open
BlueCobold opened this issue Nov 13, 2024 · 1 comment

Comments

@BlueCobold
Copy link

BlueCobold commented Nov 13, 2024

How frequently does the bug occur?

Always

Description

Using certain devices, the first constructor call of RealmConfiguration.Builder() takes 5 or more seconds. Consecutive calls within the same process takes just a millisecond. This can be reproduced every time using the same devices. Note that neither a build() is being called, nor a Realm is being opened. Just creating a Builder on itself takes quite long and it does seem to correlate to the number of classes passed.

Stacktrace & log output

No response

Can you reproduce the bug?

Always

Reproduction Steps

Use my schema and call the constructor. I can provide the schema or a minimal app if required.

        val schema = ...
        var t1 = System.currentTimeMillis()
        RealmConfiguration.Builder(schema)
        Log.d(LogTAG, "Init builder: ${System.currentTimeMillis() - t1}") // ~5000 ms
        t1 = System.currentTimeMillis()
        RealmConfiguration.Builder(schema)
        Log.d(LogTAG, "Init builder: ${System.currentTimeMillis() - t1}") // 0 ms

Version

2.2.0

What Atlas App Services are you using?

Local Database only

Are you using encryption?

Yes

Platform OS and version(s)

Android 8

Build environment

Android Studio version: Android Studio Koala Feature Drop | 2024.1.2
Android Build Tools version: gradle build tools 8.6, compile SDK 34
Gradle version: 8.7

Copy link

sync-by-unito bot commented Nov 13, 2024

➤ PM Bot commented:

Jira ticket: RKOTLIN-1140

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

1 participant