Skip to content

Optimize child_process performance #138

@mehulkar

Description

@mehulkar

child_process takes ~20ms to run a script with execSync. If this can be optimized further, that would be great.

Use case

I have ported some bash scripts to Node.js to make them more easily cross-platform. But sometimes that means using child_process to call out to other programs (e.g. git). These calls can add up and make me think twice about the performance tradeoff.

Benchmark

Here's a benchmark: https://github.com/mehulkar/bench-childprocess

Ref

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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