agrosner / agrosner/DBFlow

Slow dbFlow library

Aperta
#1,539 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Kotlin
Stelle
4.8k
Fork
593
Merge medio
1m
PR unite (30g)
1

Descrizione

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 .

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.