nushell / nushell/nushell

Performance issue: Prompt command gets ran on every character.

Open
#11,837 3 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A:line-editor performance
Dominant language
Rust
Stars
40.5k
Forks
2.3k
Avg merge
1d 19h
Merged PRs (30d)
85

Description

Describe the bug

As the title says, when you set a custom prompt command, like starship, it gets called every time you input another character.

This isn't really noticeable on a local machine with a good CPU, but it really makes it unusable over SSH.

Fish, bash and ZSH work fine with starship on my pretty slow VPS, but Nushell does not, as it calls starship all the time making it take too long.

How to reproduce
  1. Install starship onto a VPS
  2. Hook it up for fish and nushell
  3. Compare the responsiveness over SSH
Expected behavior

Only to run the prompt command once. If it has to redraw it all the time, it can cache the output I guess. This shouldn't be needed though, as redrawing everything atm makes it flicker. Fish handles it well.

Screenshots

No response

Configuration
key value
version 0.89.0
branch
commit_hash
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.75.0 (82e1608df 2023-12-21) (built from a source tarball)
cargo_version cargo 1.75.0
build_time 1980-01-01 00:00:00 +00:00
build_rust_channel release
allocator mimalloc
features default, sqlite, trash, which, zip
installed_plugins
Additional context

No response

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

Reproduce the prompt-command behavior by comparing Nushell with fish, bash, and ZSH over SSH using the reported 0.89.0 configuration. No source file or test is identified in the issue, so trace the interactive prompt redraw path and verify that typing characters no longer invokes the custom command unnecessarily or causes flicker.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.