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

Improve npx speed #12620

Closed
bep opened this issue Jun 23, 2024 · 1 comment
Closed

Improve npx speed #12620

bep opened this issue Jun 23, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@bep
Copy link
Member

bep commented Jun 23, 2024

Resolving binaries with npx seem to have about 200ms overhead, which isn't great ...

See tailwindlabs/tailwindcss#13886

@bep bep self-assigned this Jun 23, 2024
@bep bep removed the NeedsTriage label Jun 23, 2024
@bep bep added this to the v0.128.0 milestone Jun 23, 2024
@bep
Copy link
Member Author

bep commented Jun 24, 2024

So, I have done some research on this and there's no way to cache the path found by npx.1. So what I'm suggesting/doing is:

  1. Check WORKDIR\node_modules\.bin\<binaryName>
  2. Check npx if npx is available.
  3. Check PATH

Footnotes

  1. There's npm which, but that triggers a "download prompt", which is not something we can support.

bep added a commit to bep/hugo that referenced this issue Jun 24, 2024
bep added a commit to bep/hugo that referenced this issue Jun 24, 2024
bep added a commit to bep/hugo that referenced this issue Jun 24, 2024
bep added a commit to bep/hugo that referenced this issue Jun 25, 2024
bep added a commit to bep/hugo that referenced this issue Jun 25, 2024
bep added a commit to bep/hugo that referenced this issue Jun 25, 2024
bep added a commit to bep/hugo that referenced this issue Jun 25, 2024
bep added a commit to bep/hugo that referenced this issue Jun 25, 2024
bep added a commit to bep/hugo that referenced this issue Jun 25, 2024
bep added a commit to bep/hugo that referenced this issue Jun 25, 2024
@bep bep closed this as completed in e1317dd Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant