ankidroid / ankidroid/Anki-Android

CardContentProvider: Avoid eager materialization of search results

Ouverte
#20,253 9 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
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.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.