Skip to content

Stream results instead of accumulating them in memory #1

Open
@arturom

Description

@arturom

Your implementation of the mysql2json protocol saves all the results to memory, so the number of results it can handle depends on the amount of free memory. The original implementation prints every line as it's own JSON object. In other words, it creates new-line-delimited JSON.

instead of doing this:

[
   {"row":  1},
   {"row":  2},
   {"row":  3}
]

it simply does this

{"row":  1}
{"row":  2}
{"row":  3}

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