Skip to content

Add support for running the result parser in a Web/NodeJS worker #529

@peter-leonov-ch

Description

@peter-leonov-ch

Use case

For bigger chunks it might take some significant amount of time to parse ClickHouse chunks and then parse the corresponding JSON into JS objects which leads to the event loop lag growing or even to some events timing out because of the micro-tasks.

Describe the solution you'd like

Allows the networking and chunking code to run in a separate thread passing back only the already parsed JS objects using structured clone mechanism. Even though this requires additional CPU cycles and memory copying the benefit of using multiple CPU cores and a separate event loop might be desirable for high load applications reading multiple heavy streams in the same JS isolate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions