perf(shell): pixi shell is slow with fish
Checks
-
[x] I have checked that this issue has not already been reported.
-
[x] I have confirmed this bug exists on the latest version of pixi, using
pixi --version.
Reproducible example
pixi info output:
System
------------
Pixi version: 0.58.0
Platform: osx-arm64
Virtual packages: __unix=0=0
: __osx=15.6.1=0
: __archspec=1=m2
Cache dir: /Users/user/Library/Caches/rattler/cache
Auth storage: /Users/user/.rattler/credentials.json
Config locations: /Users/user/.pixi/config.toml
Global
------------
Bin dir: /Users/user/.pixi/bin
Environment dir: /Users/user/.pixi/envs
Manifest dir: /Users/user/.pixi/manifests/pixi-global.toml
Workspace
------------
Name: new
Version: 0.1.0
Manifest file: /Users/user/Downloads/new/pixi.toml
Last updated: 28-10-2025 17:24:03
Environments
------------
Environment: default
Features: default
Channels: conda-forge
Dependency count: 0
Target platforms: osx-arm64
Prefix location: /Users/user/Downloads/new/.pixi/envs/default
Issue description
When using fish (with an empty config), pixi shell takes a few seconds to spawn into a shell. By contrast, starting in zsh or bash the shell launches almost instantaneously.
Running pixi shell -vvv, allow debug commands print nearly immediately, with the last command being:
DEBUG pixi_cli::shell: Starting shell 'fish ' with source command: ' source "/var/folders/gq/kk0fb78d50vdr2kh_vjdml2syy_81s/T/pixi_env_2lP.fish"' which hangs until the shell spawns.
Expected behavior
It should start quickly, comparably with zsh or bash. Is there a setting that might ameliorate this? I've been using pixi with fish for a while now, and I believe it used to be faster in the past.
Please provide the Pixi manifest where you experience the slow startup
This occurs with every pixi manifest, including a blank one:
[workspace] authors = ["TheSkyentist"] channels = ["conda-forge"] name = "new" platforms = ["osx-arm64"] version = "0.1.0"
[tasks]
Huh, that is surprising. @tdejager tried it on his mac, and it was fast for him.
You say pixi shell takes multiple seconds for you @TheSkyentist?
Yes, pixi shell takes about 2.5 seconds.
@mfouesneau can confirm the same behavior on a similar M2 mac.
I've tried clearing/resetting all zsh and fish configs to no avail. @mfouesneau does not use fish and installed it for this test but seems the same behaviour.
In addition, simply running source /var/...etc....fish in a fish shell runs very fast, so I wonder if it is something after that, but I'm not an expert on how this works.
Can you show me the output of: time fish --login -i -c exit. From outside of fish like from bash. And the same with --no-config?
From zsh:
fish --login -i -c exit 0.05s user 0.05s system 80% cpu 0.128 total
fish --login --no-config -i -c exit 0.01s user 0.01s system 73% cpu 0.033 total
From bash: (normal)
real 0m0.128s user 0m0.056s sys 0m0.050s
(no config)
real 0m0.035s user 0m0.011s sys 0m0.018s
From fish: (normal)
Executed in 104.94 millis fish external usr time 60.99 millis 0.31 millis 60.68 millis sys time 43.27 millis 2.10 millis 41.16 millis
(no config)
Executed in 27.80 millis fish external usr time 10.44 millis 0.30 millis 10.14 millis sys time 13.43 millis 1.87 millis 11.56 millis
Loading my config does take more time. However I have also tried replacing my fish config with a blank one and this does not speed up the time it takes to load pixi shell (at least noticeably).
So strange.. Can you give the pixi shell timings? Do you have any setting in the pixi global configuration?
Only other thing I can think of is using a sampling profiler for debugging.
I'm happy to run one! Do you have recommendations for which would be most helpful or might be best for interpreting what might be going on in this case?
Also, one more clue perhaps, pixi run ... runs without any slowdown.
I just tried pixi shell with fish on my linux machine and I can confirm that it takes about two seconds for me, while bash is instantaneous.
https://prefix.dev/channels/conda-forge/packages/samply is a good profiler to try out.
A pixi global install samply should work.
Some usage instructions for samly are here: https://github.com/mstange/samply
Might be that you need to use a debug version with pixi. To get some nice output. From the pixi project you can use pixi r install-as-debug pixi-dev or some other name, that should give you a globally installed version of a debug build. Or just use cargo if you have that.
Thanks @tdejager, I'm on vacation next week but will give this a try when I get back.
Thanks for giving it a go, looking forward to what will turn up!
@tdejager I don't think you want to use the debug install command still it has optimization at 1.
According to the docs, you want release profile with debug info enabled
Also good!