ankidroid / ankidroid/Anki-Android
CardContentProvider: Avoid eager materialization of search results
Ouverte
API
Priority-Low
- Langage dominant
- Kotlin
- Étoiles
- 11.8k
- Forks
- 2.9k
- Merge moyen
- 2 j 3 h
- PR mergées (30 j)
- 167
Description
```kotlin
val rv = MatrixCursor(columns, cardIds.size)
```
This allocates memory for all matching rows up front and instantiates Card objects for every result before returning the cursor
I'm concerned that we're not streaming the results and we could OOM
This is a standard pattern in many other methods in the class.
_Originally posted by @david-allison in https://github.com/ankidroid/Anki-Android/pull/20175#discussion_r2739962880_
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.