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

perf(bash-v2): short-circuit descriptionless candidate lists #1686

Merged
merged 1 commit into from May 4, 2022

Commits on Apr 30, 2022

  1. perf(bash-v2): short-circuit descriptionless candidate lists

    If the list of candidates has no descriptions, short circuit all the
    description processing logic, basically just do a `compgen -W` for the
    whole list and be done with it.
    
    We could conceivably do some optimizations like this and more when
    generating the completions with `--no-descriptions` in Go code, by
    omitting some parts we know won't be needed, or doing some things
    differently. But doing it this way in bash, the improvements are
    available also to completions generated with descriptions enabled when
    they are invoked for completion cases that produce no
    descriptions. The result after this for descriptionless entries seems
    fast enough so it seems there's no immediate need to look into doing
    that.
    scop committed Apr 30, 2022
    Copy the full SHA
    ebdfdf3 View commit details
    Browse the repository at this point in the history