Skip to content

Optimize the CSV/TSV parsing #69

@sharmrj

Description

@sharmrj

The current bottleneck in our benchmarks is the parsing and file reading, which eclipses the rest of the operations. This can be seen in the flame graph for the chipotle example (generated using https://www.speedscope.app/)

Image

The proposed solution is to use a state-machine. We'll avoid using Attoparsec to minimize the memory footprint (since we don't need backtracking and Attoparsec stores the entire input in memory in case it needs to backtrack).
The general outline of the approach can be found here: https://gist.github.com/sharmrj/8f745afd04fcd066851627e3e59fe5eb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions