Skip to content

Improve file reading performance #18

Description

@cristianlivella

PhpSpreadsheet uses a lot of memory in order to read the input file.

Roughly ~400 MB of RAM are used for elaborate a report with ~200.000 transactions. Of these, about 350 MB are used by PhpSpreadsheet.

This seems to be a known and frequent problem: https://phpspreadsheet.readthedocs.io/en/latest/topics/memory_saving.

We need to consider replacing it with Spout, because of the supported file formats (csv, xsls and ods).

Spout seems to use much less memory (they say 3 MB, regardless of file size), but seems to be less smart about recognizing file types and delimiters for CSV files.

We could use PhpSpreadsheet to recognize the file type and delimiters, and then Spout to actually read the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance related issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions