agrosner / agrosner/DBFlow

Slow dbFlow library

Offen
#1,539 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Kotlin
Sterne
4.8k
Forks
593
Ø Merge
1 Min.
Gemergte PRs (30 T.)
1

Beschreibung

DBFlow Version: 4.2.3
Bug or Feature Request: Slow dbFlow library
Description:

The dbFlow library is very valuable, but unfortunately it's a bit slow.
I realized that even with the state of cache mode activated, this library is slow.

For example, I have about 50 items in the table below and it takes about 1 second to fetch from the database.

my table :
```
@Table(database = AppDatabase::class, cachingEnabled = true, allFields = true)
data class DocData(
@PrimaryKey(autoincrement = true) @Index var uid: Long = 0L,
@Column @Index var roseid: String = "",
@Column var type: Int = 0,
@Column var note: String = "",
@Column var datetime: String = Utils.getDateTime(),
@Column var file: String = "",
@Column var size: Long = 0L,
@Column var time: String = "0:00:00",
@Column var sync: Int = 0)
```

my code :
```
override fun selectDocs(roseid: String): ArrayList {
return SQLite.select().from(DocData::class).where(DocData_Table.roseid.eq(roseid)).list as ArrayList
}
```

Note that the higher the number of queries is going up, the slowdown will not be felt in the TSQL mode.

Please fix this. Thank .

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.