Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

child_process: refactor to use more primordials #36269

Closed
wants to merge 1 commit into from

Conversation

Lxxyx
Copy link
Member

@Lxxyx Lxxyx commented Nov 25, 2020

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the child_process Issues and PRs related to the child_process subsystem. label Nov 25, 2020
@Lxxyx Lxxyx marked this pull request as draft November 26, 2020 13:43
@Lxxyx Lxxyx marked this pull request as ready for review November 27, 2020 05:20
Copy link
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR. Please remove the unrelated changes, and I've also let a comment on an optimisation we can make.

lib/child_process.js Outdated Show resolved Hide resolved
lib/child_process.js Outdated Show resolved Hide resolved
lib/child_process.js Outdated Show resolved Hide resolved
lib/child_process.js Outdated Show resolved Hide resolved
lib/internal/child_process.js Outdated Show resolved Hide resolved
@aduh95

This comment has been minimized.

@Lxxyx

This comment has been minimized.

@aduh95
Copy link
Contributor

aduh95 commented Nov 27, 2020

The benchmark suite is crashing before completion, I've opened #36295 to fix that.

@aduh95
Copy link
Contributor

aduh95 commented Dec 2, 2020

@aduh95
Copy link
Contributor

aduh95 commented Dec 2, 2020

Benchmark results:

                                                                                confidence improvement accuracy (*)    (**)   (***)
child_process/child-process-params.js params=1 methodName='execFile' n=1000             **     -5.19 %       ±3.52%  ±4.71%  ±6.20%
child_process/child-process-params.js params=2 methodName='execFile' n=1000              *     -3.18 %       ±2.91%  ±3.91%  ±5.14%
child_process/child-process-params.js params=2 methodName='spawn' n=1000                 *      2.65 %       ±2.61%  ±3.48%  ±4.54%
child_process/child-process-params.js params=2 methodName='spawnSync' n=1000             *     -4.32 %       ±3.80%  ±5.09%  ±6.71%
child_process/child-process-params.js params=3 methodName='exec' n=1000                  *     -1.94 %       ±1.74%  ±2.32%  ±3.02%
child_process/child-process-read.js dur=5 len=4096                                       *    -10.08 %       ±9.24% ±12.30% ±16.01%
                                                                                confidence improvement accuracy (*)    (**)   (***)
child_process/child-process-exec-stdout.js dur=5 len=1024                                      -0.06 %       ±0.30%  ±0.40%  ±0.53%
child_process/child-process-exec-stdout.js dur=5 len=256                                        0.03 %       ±0.20%  ±0.27%  ±0.35%
child_process/child-process-exec-stdout.js dur=5 len=32768                                     -0.00 %       ±0.01%  ±0.01%  ±0.01%
child_process/child-process-exec-stdout.js dur=5 len=4096                                       0.32 %       ±1.14%  ±1.51%  ±1.97%
child_process/child-process-exec-stdout.js dur=5 len=64                                         0.00 %       ±0.01%  ±0.01%  ±0.01%
child_process/child-process-params.js params=1 methodName='execFile' n=1000             **     -5.19 %       ±3.52%  ±4.71%  ±6.20%
child_process/child-process-params.js params=1 methodName='execFileSync' n=1000                 0.55 %       ±5.21%  ±6.94%  ±9.04%
child_process/child-process-params.js params=1 methodName='exec' n=1000                        -0.76 %       ±1.86%  ±2.48%  ±3.22%
child_process/child-process-params.js params=1 methodName='execSync' n=1000                    -1.29 %       ±3.62%  ±4.82%  ±6.29%
child_process/child-process-params.js params=1 methodName='spawn' n=1000                       -1.42 %       ±1.89%  ±2.52%  ±3.28%
child_process/child-process-params.js params=1 methodName='spawnSync' n=1000                   -1.87 %       ±3.18%  ±4.24%  ±5.55%
child_process/child-process-params.js params=2 methodName='execFile' n=1000              *     -3.18 %       ±2.91%  ±3.91%  ±5.14%
child_process/child-process-params.js params=2 methodName='execFileSync' n=1000                -1.73 %       ±4.37%  ±5.81%  ±7.57%
child_process/child-process-params.js params=2 methodName='exec' n=1000                        -0.77 %       ±1.80%  ±2.39%  ±3.11%
child_process/child-process-params.js params=2 methodName='execSync' n=1000                     0.38 %       ±2.58%  ±3.44%  ±4.48%
child_process/child-process-params.js params=2 methodName='spawn' n=1000                 *      2.65 %       ±2.61%  ±3.48%  ±4.54%
child_process/child-process-params.js params=2 methodName='spawnSync' n=1000             *     -4.32 %       ±3.80%  ±5.09%  ±6.71%
child_process/child-process-params.js params=3 methodName='execFile' n=1000                    -1.41 %       ±3.05%  ±4.05%  ±5.28%
child_process/child-process-params.js params=3 methodName='execFileSync' n=1000                -2.51 %       ±3.64%  ±4.86%  ±6.35%
child_process/child-process-params.js params=3 methodName='exec' n=1000                  *     -1.94 %       ±1.74%  ±2.32%  ±3.02%
child_process/child-process-params.js params=3 methodName='spawn' n=1000                        1.99 %       ±2.79%  ±3.72%  ±4.85%
child_process/child-process-params.js params=3 methodName='spawnSync' n=1000                    2.45 %       ±4.77%  ±6.35%  ±8.27%
child_process/child-process-params.js params=4 methodName='execFile' n=1000                    -1.66 %       ±2.70%  ±3.60%  ±4.70%
child_process/child-process-read-ipc.js dur=5 len=1024                                         -0.37 %       ±3.09%  ±4.11%  ±5.34%
child_process/child-process-read-ipc.js dur=5 len=1048576                                       3.12 %       ±6.50%  ±8.66% ±11.30%
child_process/child-process-read-ipc.js dur=5 len=16384                                         0.53 %       ±2.96%  ±3.94%  ±5.13%
child_process/child-process-read-ipc.js dur=5 len=2097152                                      -6.63 %      ±15.90% ±21.20% ±27.70%
child_process/child-process-read-ipc.js dur=5 len=256                                           2.02 %       ±3.44%  ±4.57%  ±5.95%
child_process/child-process-read-ipc.js dur=5 len=4096                                         -0.05 %       ±3.52%  ±4.68%  ±6.09%
child_process/child-process-read-ipc.js dur=5 len=64                                           -2.14 %       ±3.01%  ±4.02%  ±5.25%
child_process/child-process-read-ipc.js dur=5 len=65536                                        -1.26 %       ±1.43%  ±1.90%  ±2.48%
child_process/child-process-read.js dur=5 len=1024                                             -1.59 %      ±14.56% ±19.37% ±25.22%
child_process/child-process-read.js dur=5 len=256                                              -5.47 %      ±17.60% ±23.45% ±30.58%
child_process/child-process-read.js dur=5 len=32768                                             2.35 %      ±15.29% ±20.35% ±26.50%
child_process/child-process-read.js dur=5 len=4096                                       *    -10.08 %       ±9.24% ±12.30% ±16.01%
child_process/child-process-read.js dur=5 len=64                                                2.21 %      ±16.92% ±22.51% ±29.30%
child_process/spawn-echo.js n=1000                                                             -0.19 %       ±1.63%  ±2.17%  ±2.82%

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Dec 2, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 2, 2020
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Dec 3, 2020

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 3, 2020
@github-actions github-actions bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 3, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2020

Landed in a897a25...f7dd330

@github-actions github-actions bot closed this Dec 3, 2020
nodejs-github-bot pushed a commit that referenced this pull request Dec 3, 2020
PR-URL: #36269
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@Lxxyx Lxxyx deleted the child_process-primordials branch December 4, 2020 04:11
danielleadams pushed a commit that referenced this pull request Dec 7, 2020
PR-URL: #36269
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@danielleadams danielleadams mentioned this pull request Dec 7, 2020
cjihrig pushed a commit to cjihrig/node that referenced this pull request Dec 8, 2020
PR-URL: nodejs#36269
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@targos targos added dont-land-on-v12.x and removed author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backport-blocked-v14.x labels Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
child_process Issues and PRs related to the child_process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants