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

errors: improve performance of classRegExp in errors.js #49643

Merged
merged 2 commits into from
Sep 16, 2023

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Sep 14, 2023

This PR simplifies the RegExp for detecting class names

Main:
error/error-class-reg-exp.js n=100000: 9,114.045930023383

PR:
error/error-class-reg-exp.js n=100000: 11,002.079862772853

@nodejs-github-bot nodejs-github-bot added errors Issues and PRs related to JavaScript errors originated in Node.js core. needs-ci PRs that need a full CI run. labels Sep 14, 2023
@Uzlopak Uzlopak changed the title errors: improve classRegExp in errors.js errors: improve performance of classRegExp in errors.js Sep 14, 2023
@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 14, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 14, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels Sep 14, 2023
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Sep 16, 2023
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/49643
✔  Done loading data for nodejs/node/pull/49643
----------------------------------- PR info ------------------------------------
Title      errors: improve performance of classRegExp in errors.js (#49643)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     Uzlopak:improve-classRegExp -> nodejs:main
Labels     errors, author ready, needs-ci
Commits    2
 - errors: improve classRegExp in errors.js
 - fix linting issue
Committers 1
 - uzlopak 
PR-URL: https://github.com/nodejs/node/pull/49643
Reviewed-By: Yagiz Nizipli 
Reviewed-By: LiviaMedeiros 
Reviewed-By: Antoine du Hamel 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/49643
Reviewed-By: Yagiz Nizipli 
Reviewed-By: LiviaMedeiros 
Reviewed-By: Antoine du Hamel 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Thu, 14 Sep 2023 01:06:38 GMT
   ✔  Approvals: 3
   ✔  - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/49643#pullrequestreview-1625778455
   ✔  - LiviaMedeiros (@LiviaMedeiros): https://github.com/nodejs/node/pull/49643#pullrequestreview-1627548542
   ✔  - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/49643#pullrequestreview-1627640362
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2023-09-14T18:44:30Z: https://ci.nodejs.org/job/node-test-pull-request/53951/
- Querying data for job/node-test-pull-request/53951/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
✔  origin/main is now up-to-date
- Downloading patch for 49643
From https://github.com/nodejs/node
 * branch                  refs/pull/49643/merge -> FETCH_HEAD
✔  Fetched commits as f42a1039917a..8a9e34c3f276
--------------------------------------------------------------------------------
Auto-merging lib/internal/errors.js
[main 115c123fdb] errors: improve classRegExp in errors.js
 Author: uzlopak 
 Date: Thu Sep 14 03:04:46 2023 +0200
 2 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 benchmark/error/error-class-reg-exp.js
[main e70bc66291] fix linting issue
 Author: uzlopak 
 Date: Thu Sep 14 03:32:14 2023 +0200
 1 file changed, 3 insertions(+), 3 deletions(-)
   ✔  Patches applied
There are 2 commits in the PR. Attempting autorebase.
Rebasing (2/4)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
errors: improve classRegExp in errors.js

PR-URL: #49643
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: LiviaMedeiros livia@cirno.name
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD 0e95b8f4c0] errors: improve classRegExp in errors.js
Author: uzlopak aras.abbasi@googlemail.com
Date: Thu Sep 14 03:04:46 2023 +0200
2 files changed, 25 insertions(+), 1 deletion(-)
create mode 100644 benchmark/error/error-class-reg-exp.js
Rebasing (3/4)
Rebasing (4/4)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
fix linting issue

PR-URL: #49643
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: LiviaMedeiros livia@cirno.name
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD d2443d7ea2] fix linting issue
Author: uzlopak aras.abbasi@googlemail.com
Date: Thu Sep 14 03:32:14 2023 +0200
1 file changed, 3 insertions(+), 3 deletions(-)

Successfully rebased and updated refs/heads/main.

ℹ Add commit-queue-squash label to land the PR as one commit, or commit-queue-rebase to land as separate commits.

https://github.com/nodejs/node/actions/runs/6204361859

@LiviaMedeiros LiviaMedeiros added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Sep 16, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 16, 2023
@nodejs-github-bot nodejs-github-bot merged commit db8217b into nodejs:main Sep 16, 2023
67 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in db8217b

@Uzlopak Uzlopak deleted the improve-classRegExp branch September 16, 2023 11:40
ruyadorno pushed a commit that referenced this pull request Sep 28, 2023
PR-URL: #49643
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This was referenced Sep 28, 2023
alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
PR-URL: nodejs#49643
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
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. commit-queue-failed An error occurred while landing this pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. errors Issues and PRs related to JavaScript errors originated in Node.js core. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants