nushell / nushell/nu_scripts

Performance issues on man completions

Open
#588 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nushell
Stars
1.3k
Forks
323
Avg merge
2h 55m
Merged PRs (30d)
3

Description

Basically the title. Completions can take up to a second or more, a quick count reveals I have 57124 manpage entries on my system. The initial completion taking a while may be reasonable, however, I believe what makes it not reasonable is attempting to do something along the lines of

  • man git-<tab> (examine results)
  • c takes a few seconds to appear again, then any subsequent additional characters triggers a complete regeneration of search list. This makes typing the rest of the manpage name unreasonably slow.

I have a handful of suggestions to make this better, namely caching at minimum entries in man -w so there is not nearly as much filesystem traversal, but I wanted to get opinions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the man-page completion entry point and reproduce the delay with a large set of manpage entries, including repeated characters after man git-<tab>. Compare the initial completion with subsequent updates; done means typing additional characters no longer causes an unreasonably slow completion refresh.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.