Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CardContentProvider: Avoid eager materialization of search results #20253

@sanjaysargam

Description

@sanjaysargam
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 #20175 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions