GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — module: execute `--import` sequentially by aduh95 · Pull Request #50474 · nodejs/node

Conversation

@aduh95

@aduh95 aduh95 commented Oct 30, 2023

Copy link
Copy Markdown
Contributor

Fixes: #50427

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

meyfa and bricss reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@aduh95
module: execute --import sequentially
411f61c
@nodejs-github-bot

nodejs-github-bot commented Oct 30, 2023

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. labels Oct 30, 2023
JakobJingleheimer
JakobJingleheimer approved these changes Oct 30, 2023
View reviewed changes
Comment thread doc/api/cli.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/fixtures/es-modules/esm-top-level-await.mjs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Uzlopak

Uzlopak commented Oct 30, 2023

Copy link
Copy Markdown
Contributor

If one of the modules has a top level await you have to load the modules in order, but if not you could load them unordered.
So it is a fix which can have performance regressions?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos
targos approved these changes Oct 30, 2023
View reviewed changes
@JakobJingleheimer

JakobJingleheimer commented Oct 30, 2023

Copy link
Copy Markdown
Member

So it is a fix which can have performance regressions?

I think it's more accurate to say this has performance implications.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

anonrig
anonrig previously requested changes Oct 30, 2023
View reviewed changes

@anonrig anonrig left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I'm -1 on this. Is it really worth preserving the order when sequential awaiting has a huge impact on performance?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aduh95

aduh95 commented Oct 30, 2023

Copy link
Copy Markdown
Contributor Author

has a huge impact on performance?

You say huge, how big are we talking about?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@anonrig

anonrig commented Oct 30, 2023

Copy link
Copy Markdown
Member

has a huge impact on performance?

You say huge, how big are we talking about?

That's a good question that deserves a benchmark 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@anonrig anonrig added the needs-benchmark-ci PRs that need a benchmark CI run. label Oct 30, 2023
@GeoffreyBooth

GeoffreyBooth commented Oct 30, 2023

Copy link
Copy Markdown
Member

I’m -1 on this. Is it really worth preserving the order when sequential awaiting has a huge impact on performance?

Yes, because the current implementation doesn’t achieve the desired effect. If the first --import registers hooks to handle TypeScript, the second --import of a TypeScript file should work. It doesn’t matter how much slower it becomes; the current behavior is broken.

If the user wants parallelized loading, they can put a bunch of import statements into a file and --import that.

arcanis, JakobJingleheimer, and meyfa reacted with thumbs up emoji
All reactions
  • 👍 3 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@anonrig
anonrig dismissed their stale review October 30, 2023 16:06

Convinced by @GeoffreyBooth's comments

@aduh95

aduh95 commented Oct 30, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

has a huge impact on performance?

You say huge, how big are we talking about?

That's a good question that deserves a benchmark 👍

I don't think it's that good of a question, it was mostly rhetorical. The change has literally no impact on folks who are not using --import, and the impact of folks using lots of --import will depend a lot on what's inside the imported modules. I don't think we can come up with a benchmark showing regressions unless it's very artificial (i.e. no real-world use case would be impacted), but happy to be proven wrong.

--import is an experimental API, performance consideration is not a strong enough reason to block that PR from landing IMO (unless you're saying it will slow down users who are not using it, but I don't think it's the case).

JakobJingleheimer reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GeoffreyBooth GeoffreyBooth removed the needs-benchmark-ci PRs that need a benchmark CI run. label Oct 30, 2023
@giltayar

giltayar commented Oct 31, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

I’m -1 on this. Is it really worth preserving the order when sequential awaiting has a huge impact on performance?

@GeoffreyBooth supplied one reason it has to be sequential. Another reason is the "loader registration use case" as outlined in #50427 (and which was how this bug was found), where if the user writes --import loader-a --import loader-b then they want to register the loaders to be registered in that specific order because loader chain order is important: some loaders have to be chained in just the right order.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

MoLow
MoLow approved these changes Oct 31, 2023
View reviewed changes
arcanis
arcanis reviewed Oct 31, 2023
View reviewed changes
Comment thread test/es-module/test-esm-import-flag.mjs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@aduh95 @JakobJingleheimer
Apply suggestions from code review
174c719
Co-authored-by: Jacob Smith <[email protected]>
@aduh95 aduh95 added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. commit-queue-squash PRs the Commit Queue should land as one squashed commit. labels Oct 31, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Oct 31, 2023
@nodejs-github-bot

nodejs-github-bot commented Oct 31, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/55363/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Oct 31, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/55366/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Oct 31, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/55367/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95 aduh95 added the commit-queue PRs queued for automated landing through the Commit Queue. label Oct 31, 2023
@github-actions github-actions Bot mentioned this pull request Nov 1, 2023
CI Reliability 2023-11-01 nodejs/reliability#704
Open
24 tasks
@nodejs-github-bot

nodejs-github-bot commented Nov 1, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/55377/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels Nov 1, 2023
@nodejs-github-bot

nodejs-github-bot commented Nov 1, 2023

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/50474
✔  Done loading data for nodejs/node/pull/50474
----------------------------------- PR info ------------------------------------
Title      module: execute `--import` sequentially (#50474)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     aduh95:--import-serial -> nodejs:main
Labels     process, author ready, needs-ci, commit-queue-squash
Commits    2
 - module: execute `--import` sequentially
 - Apply suggestions from code review
Committers 2
 - Antoine du Hamel 
 - GitHub 
PR-URL: https://github.com/nodejs/node/pull/50474
Fixes: https://github.com/nodejs/node/issues/50427
Reviewed-By: Jacob Smith 
Reviewed-By: Michaël Zasso 
Reviewed-By: Moshe Atlow 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/50474
Fixes: https://github.com/nodejs/node/issues/50427
Reviewed-By: Jacob Smith 
Reviewed-By: Michaël Zasso 
Reviewed-By: Moshe Atlow 
--------------------------------------------------------------------------------
   ⚠  Commits were pushed since the last approving review:
   ⚠  - Apply suggestions from code review
   ℹ  This PR was created on Mon, 30 Oct 2023 10:21:43 GMT
   ✔  Approvals: 3
   ✔  - Jacob Smith (@JakobJingleheimer): https://github.com/nodejs/node/pull/50474#pullrequestreview-1703780454
   ✔  - Michaël Zasso (@targos) (TSC): https://github.com/nodejs/node/pull/50474#pullrequestreview-1703829531
   ✔  - Moshe Atlow (@MoLow) (TSC): https://github.com/nodejs/node/pull/50474#pullrequestreview-1705908328
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2023-11-01T05:42:53Z: https://ci.nodejs.org/job/node-test-pull-request/55377/
- Querying data for job/node-test-pull-request/55377/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/6718540805
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos
targos approved these changes Nov 1, 2023
View reviewed changes
@aduh95 aduh95 added commit-queue PRs queued for automated landing through the Commit Queue. and removed commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. labels Nov 1, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 1, 2023
@nodejs-github-bot
nodejs-github-bot merged commit a3e09b3 into nodejs:main Nov 1, 2023
@nodejs-github-bot

nodejs-github-bot commented Nov 1, 2023

Copy link
Copy Markdown
Collaborator

Landed in a3e09b3

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95
aduh95 deleted the --import-serial branch November 1, 2023 12:50
This was referenced Nov 2, 2023
CI Reliability 2023-11-02 nodejs/reliability#705
Open
CI Reliability 2023-11-03 nodejs/reliability#706
Open
CI Reliability 2023-11-04 nodejs/reliability#707
Open
CI Reliability 2023-11-05 nodejs/reliability#708
Open
CI Reliability 2023-11-06 nodejs/reliability#709
Open
CI Reliability 2023-11-07 nodejs/reliability#710
Open
targos pushed a commit that referenced this pull request Nov 11, 2023
@aduh95 @targos
module: execute --import sequentially
cc6658d
PR-URL: #50474
Fixes: #50427
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
@targos targos mentioned this pull request Nov 12, 2023
v21.2.0 release proposal #50681
Merged
targos pushed a commit that referenced this pull request Nov 14, 2023
@aduh95 @targos
module: execute --import sequentially
3606a0a
PR-URL: #50474
Fixes: #50427
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
UlisesGascon pushed a commit that referenced this pull request Dec 11, 2023
@aduh95 @UlisesGascon
module: execute --import sequentially
77e8361
PR-URL: #50474
Fixes: #50427
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
@UlisesGascon UlisesGascon mentioned this pull request Dec 12, 2023
v20.11.0 proposal #51124
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JakobJingleheimer JakobJingleheimer JakobJingleheimer approved these changes
@MoLow MoLow MoLow approved these changes
@anonrig anonrig anonrig left review comments
+2 more reviewers
@arcanis arcanis arcanis left review comments
@targos targos targos approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue-squash PRs the Commit Queue should land as one squashed commit. needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

--import order is wrong when one of the modules imports a module

Uh oh!

There was an error while loading. Please reload this page.

10 participants

@aduh95 @nodejs-github-bot @Uzlopak @JakobJingleheimer @anonrig @GeoffreyBooth @giltayar @arcanis @targos @MoLow
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.