Skip to content

Change getSamples() return type from array to iterable #227

@pounard

Description

@pounard

Later in anonymizers, we will have file loaders.

The getSample() method returns an array, but file readers will read files sequentially using generators, which will force us to create a temporary array with all values in memory for nothing.

Using iterable typing and using it accordingly will allow us to never go through an array and gain memory and speed (and avoid potential memory limit errors in constrained environments).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions