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

lib: reduce overhead of blob clone #50110

Merged
merged 3 commits into from Oct 17, 2023
Merged

Conversation

H4ad
Copy link
Member

@H4ad H4ad commented Oct 10, 2023

Continuing the work started on nodejs/performance#109

                                    confidence improvement accuracy (*)   (**)  (***)
blob/clone.js bytes=1024 n=50000           ***     60.74 %       ±1.58% ±2.11% ±2.75%
blob/clone.js bytes=1048576 n=50000        ***     50.70 %       ±1.84% ±2.46% ±3.23%
blob/clone.js bytes=128 n=50000            ***     62.57 %       ±1.43% ±1.91% ±2.49%

Be aware that when doing many comparisons the risk of a false-positive
result increases. In this case, there are 3 comparisons, you can thus
expect the following amount of false-positive results:
  0.15 false positives, when considering a   5% risk acceptance (*, **, ***),
  0.03 false positives, when considering a   1% risk acceptance (**, ***),
  0.00 false positives, when considering a 0.1% risk acceptance (***)

/cc @nodejs/performance

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Oct 10, 2023
lib/internal/blob.js Outdated Show resolved Hide resolved
@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 10, 2023
@anonrig anonrig removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 10, 2023
@H4ad H4ad changed the title perf: faster blob clone lib: faster blob clone Oct 10, 2023
@H4ad H4ad marked this pull request as ready for review October 10, 2023 21:40
@tniessen
Copy link
Member

@H4ad Please review our commit message guidelines. As in #49730, this PR does not follow them.

@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 11, 2023
@github-actions github-actions bot added request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Oct 11, 2023
@github-actions
Copy link
Contributor

Failed to start CI
node:internal/modules/cjs/loader:1028
  const err = new Error(message);
              ^

Error: Cannot find module 'call-bind'
Require stack:

  • /opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/@node-core/utils/node_modules/@ljharb/through/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
    at Function.Module._load (node:internal/modules/cjs/loader:873:27)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object. (/opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/@node-core/utils/node_modules/@ljharb/through/index.js:4:16)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at ModuleWrap. (node:internal/modules/esm/translators:169:29) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/@node-core/utils/node_modules/@ljharb/through/index.js'
    ]
    }
https://github.com/nodejs/node/actions/runs/6479674339

@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 11, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 11, 2023
@github-actions
Copy link
Contributor

Failed to start CI
node:internal/modules/cjs/loader:1028
  const err = new Error(message);
              ^

Error: Cannot find module 'call-bind'
Require stack:

  • /opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/@node-core/utils/node_modules/@ljharb/through/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
    at Function.Module._load (node:internal/modules/cjs/loader:873:27)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object. (/opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/@node-core/utils/node_modules/@ljharb/through/index.js:4:16)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at ModuleWrap. (node:internal/modules/esm/translators:169:29) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/@node-core/utils/node_modules/@ljharb/through/index.js'
    ]
    }
https://github.com/nodejs/node/actions/runs/6479782777

@H4ad H4ad changed the title lib: faster blob clone lib: reduce overhead of blob clone Oct 11, 2023
@H4ad
Copy link
Member Author

H4ad commented Oct 12, 2023

Someone can add author ready?

@anonrig anonrig 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. and removed request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. labels Oct 12, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 12, 2023
@nodejs-github-bot
Copy link
Collaborator

@RafaelGSS RafaelGSS added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Oct 15, 2023
Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

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

LGTM.

lib/internal/blob.js Outdated Show resolved Hide resolved
lib/internal/blob.js Outdated Show resolved Hide resolved
@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 16, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 16, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@legendecas legendecas added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 17, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 17, 2023
@nodejs-github-bot nodejs-github-bot merged commit badba8c into nodejs:main Oct 17, 2023
53 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in badba8c

@H4ad H4ad deleted the perf/cloned_blob branch October 17, 2023 11:56
targos pushed a commit that referenced this pull request Oct 23, 2023
PR-URL: #50110
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
PR-URL: nodejs#50110
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
@targos targos added the dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. label Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants