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

Running node parses the entry file path 5 times #49968

Open
anonrig opened this issue Sep 29, 2023 · 1 comment
Open

Running node parses the entry file path 5 times #49968

anonrig opened this issue Sep 29, 2023 · 1 comment
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. loaders Issues and PRs related to ES module loaders performance Issues and PRs related to the performance of Node.js.

Comments

@anonrig
Copy link
Member

anonrig commented Sep 29, 2023

Follow the following steps:

  1. touch buggy-bug.mjs
  2. Update lib/internal/url.js and add a console.log to URL class constructor
  3. Run the script with out/Release/node buggy-bug.mjs

Output:

➜  node git:(main) ✗ out/Release/node buggy-bug.mjs
{
  input: 'file:///Users/yagiz/Developer/node/buggy-bug.mjs',
  base: undefined
}
{
  input: 'file:///Users/yagiz/Developer/node/buggy-bug.mjs',
  base: undefined
}
{ input: 'file:///Users/yagiz/Developer/node/', base: undefined }
{
  input: 'file:///Users/yagiz/Developer/node/buggy-bug.mjs',
  base: undefined
}
{
  input: 'file:///Users/yagiz/Developer/node/buggy-bug.mjs',
  base: undefined
}
{
  input: 'file:///Users/yagiz/Developer/node/buggy-bug.mjs',
  base: undefined
}

cc @nodejs/loaders @nodejs/performance

@anonrig anonrig added performance Issues and PRs related to the performance of Node.js. esm Issues and PRs related to the ECMAScript Modules implementation. loaders Issues and PRs related to ES module loaders labels Sep 29, 2023
@GeoffreyBooth
Copy link
Member

This is related to the code path discussed in #49918.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. loaders Issues and PRs related to ES module loaders performance Issues and PRs related to the performance of Node.js.
Projects
None yet
Development

No branches or pull requests

2 participants