Status Update
Comments
ap...@google.com <ap...@google.com> #2
This is occurring due to the usage of the BundledSQLiteDriver
that loads a native file (JNI).
A small workaround you can try is to create a wrapper driver that initializes the actual one later when a connection is being opened in a background thread, delaying the initialization of the JNI library:
class BundledSQLiteDriverWrapper : SQLiteDriver {
private val actual by lazy {
BundledSQLiteDriver()
}
override fun open(fileName: String): SQLiteConnection {
return actual.open(fileName)
}
}
ap...@google.com <ap...@google.com> #3
hey , Do I really have to do that ? . It is not hurting my application at all . I was just taking some clarity on to why it is occurring which you provided.
Just dont want to run into any problems in the future since we just freshly started working with Room KMP .
Please do let me know if I should attempt a solution like you have provided or if its fine the way it is .
pr...@google.com <pr...@google.com> #4
If you don't perceive the disk read as an issue during startup / database initialization then you don't have to do the workaround. I provided it in the mean time if it was hurting your app while we try to make a fix.
pr...@google.com <pr...@google.com> #5
Great ! .acknowledged. Ty
Description
Jetpack Compose component used: AndroidView, Focus
Android Studio Build: uild #AI-233.14808.21.2331.11574862
Kotlin version: Latest
Steps to Reproduce or Code Sample to Reproduce:
1. See attached zip file for the demo repro.
2. Also see attached image diagram to demonstrate what the minimum requirement to trigger the issues