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

module: reduce url invocations in esm/load.js #48337

Merged
merged 2 commits into from
Jun 7, 2023

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Jun 5, 2023

Reduces unnecessary new URL call, and removes unnecessary invokes to url.protocol

Ref: nodejs/performance#92

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/modules

@nodejs-github-bot nodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. labels Jun 5, 2023
lib/internal/modules/esm/load.js Show resolved Hide resolved
lib/internal/modules/esm/load.js Outdated Show resolved Hide resolved
lib/internal/modules/esm/load.js Outdated Show resolved Hide resolved
@anonrig anonrig 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. request-ci Add this label to start a Jenkins CI on a PR. labels Jun 5, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 5, 2023
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@JakobJingleheimer JakobJingleheimer left a comment

Choose a reason for hiding this comment

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

I think we had talked about something similar previously, where I suggested the load hook be passed a URL instance (which we already have internally), but for some reason that I don't recall that was not good.

I think whatever that reason (something about mutability?) was, it doesn't apply here because this is internal.

@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 7, 2023
@nodejs-github-bot nodejs-github-bot merged commit 9d936fa into nodejs:main Jun 7, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 9d936fa

RafaelGSS pushed a commit that referenced this pull request Jul 3, 2023
PR-URL: #48337
Refs: nodejs/performance#92
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
@RafaelGSS RafaelGSS mentioned this pull request Jul 3, 2023
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
PR-URL: nodejs#48337
Refs: nodejs/performance#92
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
PR-URL: nodejs#48337
Refs: nodejs/performance#92
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
ruyadorno pushed a commit that referenced this pull request Aug 29, 2023
PR-URL: #48337
Refs: nodejs/performance#92
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
@ruyadorno ruyadorno mentioned this pull request Aug 29, 2023
codebytere added a commit to electron/electron that referenced this pull request Sep 19, 2023
codebytere added a commit to electron/electron that referenced this pull request Sep 19, 2023
codebytere added a commit to electron/electron that referenced this pull request Sep 20, 2023
codebytere added a commit to electron/electron that referenced this pull request Sep 20, 2023
codebytere added a commit to electron/electron that referenced this pull request Sep 20, 2023
jkleinsc pushed a commit to electron/electron that referenced this pull request Sep 20, 2023
* chore: bump node in DEPS to v18.18.0

* child_process: harden against prototype pollution

nodejs/node#48726

* deps: upgrade to libuv 1.46.0

nodejs/node#49591

* module: reduce url invocations in esm/load.js

nodejs/node#48337

* Revert "test: remove test-crypto-keygen flaky designation"

nodejs/node#48652

* fix: FTBTFS in ada dep

ada-url/ada#464
ada-url/idna#31

* fix: force_colors snapshot line number

* chore: fixup patch indices

* chore: update filenames.json

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
* chore: bump node in DEPS to v18.18.0

* child_process: harden against prototype pollution

nodejs/node#48726

* deps: upgrade to libuv 1.46.0

nodejs/node#49591

* module: reduce url invocations in esm/load.js

nodejs/node#48337

* Revert "test: remove test-crypto-keygen flaky designation"

nodejs/node#48652

* fix: FTBTFS in ada dep

ada-url/ada#464
ada-url/idna#31

* fix: force_colors snapshot line number

* chore: fixup patch indices

* chore: update filenames.json

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
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. esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants