nushell: WSL Degraded performance in 0.60.0
Describe the bug
With version 0.60.0, WSL performance has degraded significantly for me in WSL.
Nu under WSL was never particularly speedy to begin with, however it was usable for me. Now, pressing enter on an empty line requires a 5+ second wait for the next prompt with a default config.
How to reproduce
- Run nu in WSL
Expected behavior
Nu to be usable within WSL
Screenshots
No response
Configuration
(included prompts with times for reference - version command was entered immediately after the first prompts appearance)
/home/tyler〉version | transpose key value | to md --pretty 03/23/2022 08:36:26 AM
| key | value |
|---|---|
| version | 0.60.0 |
| build_os | linux-x86_64 |
| rust_version | rustc 1.59.0 (9d1b2106e 2022-02-23) |
| rust_channel | stable-x86_64-unknown-linux-gnu |
| cargo_version | cargo 1.59.0 (49d8809dc 2022-02-10) |
| pkg_version | 0.60.0 |
| build_time | 2022-03-22 22:38:13 -04:00 |
| build_rust_channel | release |
| features | dataframe, default, trash, which, zip |
| installed_plugins |
/home/tyler〉 03/23/2022 08:36:35 AM
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 6
- Comments: 15 (3 by maintainers)
Thank you, that was the issue.
For what it’s worth, appending Windows Paths is the default behavior, and a search for “WSL” either on https://www.nushell.sh/ or the readme of this repo gives me no relevant results.
For anyone having this same issue, this did it for me:
Edit: re-opening the issue for visibility - maintainers please feel free to close this when you feel it’s no longer needed, I likely won’t be paying much attention to this issue myself.
@rgwood I remember looking at this. I think it could be cleaned up by caching this list once at startup and anytime the PATH is changed. I’m not sure how easy that is to change though. FWIW, this one function is what allows nushell to run programs like
7zbecause, before they looked like math expressions.Incidentally, the fewer the number of items in your PATH variable, the faster this will be. Conversely, if you have a large number of items in your PATH variable, the slower this will be.
I’d vote to reopen this; it’s a big problem, many people are going to encounter it, and there may be ways that Nu can mitigate it.
This is the commit that introduced the slowdown: https://github.com/nushell/nushell/commit/c984ce9dc98eadf166d21985309f715d35de89af
JT said he’ll brainstorm a bit to see if there’s a fix.