Skip to content

Faster startup: chained fixups on Apple silicon, a cheaper banner, and async prompt pushes that survive - #19236

Merged
fdncred merged 1 commit into
nushell:mainfrom
fdncred:startup_speed
Oct 14, 2026
Merged

fdncred merged 1 commit into
nushell:mainfrom
fdncred:startup_speed

Conversation

@fdncred

@fdncred fdncred commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Description

Three independent changes make the REPL ready to type into sooner. With the default config, launching nu until the first prompt is drawn drops from 15.7 ms to 13.1 ms (−17%). $nu.startup-time is measured the same way as before.

Measurements:

default config, from ~ main this PR
launch to first prompt 15.70 ms 13.10 ms
$nu.startup-time 8.03 ms 7.36 ms
instructions retired by the first prompt 149.3M 119.8M
  1. Change the linker on Apple silicon to "cargo:rustc-link-arg-bins=-Wl,-fixup_chains"
  2. Make banner cheaper (all architectures)
  3. Keep prompt pushes that land before the prompt is rebuilt (all architectures)

User-facing changes (Release notes)

Faster startup and reliable prompt updates

Nushell starts faster and uses about 3 MiB less memory per process on Apple silicon Macs. On all architectures, the startup banner avoids computing the welcome message when it only prints the startup time. Measured startup improvements with the default config are shown below; $nu.startup-time is measured the same way as before.

default config, from ~ main this PR
launch to first prompt 15.70 ms 13.10 ms
$nu.startup-time 8.03 ms 7.36 ms
instructions retired by the first prompt 149.3M 119.8M

On all architectures, date to-timezone now accepts IANA time zone names in any letter case, for example date now | date to-timezone america/new_york. Previously, some lowercase names were rejected as invalid.

Prompt updates from background jobs using commandline set-prompt are no longer lost when the jobs finish before the prompt is drawn. This applies to jobs started from pre_prompt or env_change hooks or prompt closures such as $env.PROMPT_COMMAND, on all architectures. Calling commandline set-prompt directly in those hooks or closures also updates that prompt, overriding the corresponding segment's prompt-variable value rather than being replaced by subsequent prompt evaluation.

Additional notes

@github-actions github-actions Bot added the A:std-library Defining and improving the standard library written in Nu label Oct 14, 2026
@fdncred
fdncred merged commit d88d4fe into nushell:main Oct 14, 2026
13 checks passed
@fdncred
fdncred deleted the startup_speed branch October 14, 2026 21:15
@github-actions github-actions Bot added this to the v0.117.0 milestone Oct 14, 2026
@fdncred fdncred added notes:ready Indicates Ready for Release notes notes:perf Performance related PRs labels Oct 14, 2026
kronberger-droid added a commit to kronberger-droid/nushell that referenced this pull request Nov 13, 2026
…nfig

The prompt resolver takes over the `ClosureEvalOnce::try_new` call that
nushell#19159 gave `get_prompt_string`, so a prompt closure whose block is gone
is still reported instead of panicking. `commandline set-prompt` builds
its push as a `PromptContents` the way nushell#19236 does, with `vi_visual`
added.

The deprecation note in `doc_config.nu` names 0.118.0, the release this
now lands in.
kronberger-droid added a commit to kronberger-droid/nushell that referenced this pull request Nov 13, 2026
…olor-reset

`NushellPrompt` no longer owns its segments since nushell#19236, thus the
colors ask the shared `PromptState` whether a side was supplied.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A:std-library Defining and improving the standard library written in Nu notes:perf Performance related PRs notes:ready Indicates Ready for Release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant