The Wayback Machine - https://web.archive.org/web/20201117072357/https://github.com/zsh-users/zsh-completions/issues/520
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

Yarn completion is very slow #520

Open
ahmedelgabri opened this issue Aug 17, 2017 · 1 comment
Open

Yarn completion is very slow #520

ahmedelgabri opened this issue Aug 17, 2017 · 1 comment

Comments

@ahmedelgabri
Copy link

@ahmedelgabri ahmedelgabri commented Aug 17, 2017

Yarn completion is very slow when I do $ yarn <tab>, notice how long it takes after the first <tab> to show the list & also after the second <tab> to go to the first option. Any tips on how can I debug this? it seems to be only happening with yarn only, tried ag, vagrant & jq all are fast.

slow

@syohex
Copy link
Contributor

@syohex syohex commented Mar 26, 2020

Because yarn completion does

  1. Execute yarn run --json
  2. Parse 1. output and collect packageScript(scripts entries in package.json) and binCommands(scripts under .node_modules/bin) by sed and tr command
  3. Construct completion list from static list(yarn subcommands) and 2. list

As you know, we can use yarn packageScript instead of yarn run packageScript and yarn some-command instead of ./node-modules/.bin/some-command. So yarn completion should do above procedures.

I suppose faster completion commands uses only static list for completion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.