-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Slow rule eval on WSL #1036
Comments
I also tried this with instance mode disabled and had the same results. |
I have the same issue, Just installed TheFuck on my wsl 2 ubuntu, on windows 10 and it's pritty slow. Takes a few seconds beofore something happens. |
I also have the same issue with WSL on Windows 10 and |
So I've noticed overall that WSL2 is just slower when it's running on a spindle, so I'm chalking my performance up to that. I'm going to move it from my spindle to a solid state this week and see if that resolves my problem. |
Same problem on WSL 2 ubuntu 18.04
|
I'm on a SSD and it's still pretty slow. Takes like 10-20 seconds to return anything. |
Same issue as the folks above. Ubuntu 18 and 20 on WSL, and |
.... It's not a machine performance issue as far as I can deduce.
I've just reformatted my pc from the Insiders to Stable (as WSL2 is on the stable release) and have noticed a marked improvement to |
Hey guys, I figured this out. it's irrelevant to thefuck but your wsl machine. Try After that thefuck runs smooth as fuck for me Beware your vscode would be gone after that, so probably do |
Testing @kimlym 's solution:
The average of the user times was: 0.336 After removing the appended Windows path as @kimlym suggested here , running This represents a 40% reduction in user time, and a 88% reduction in sys time. However, it would be desirable for |
Problem when remove path env on Windows side is VSCode can't open in command. $ which code
/c/Program Files/Microsoft VS Code/bin/code |
@PePoDev you can add that to your path in your bashrc or w/e shell file, something like this
Might need an export on that. And for my case it's |
I not sure in the future something will broke again or not about Windows path. |
Whilst removing the windows entries in |
So there is no found explanation for why having Windows entries in path makes thefuck take such a long time? |
I created a new Wiki page called Troubleshooting and added this fix to it. I'm not familiar with any style guidelines for Github Wiki pages (if there even is such a thing), so feel free to edit it if something doesn't look right! |
fuck yeah :) So this can be closed, don't it? |
@cforce I think set If remove env path from Windows side it will make VSCode can't open in command on WSL. Maybe in another program will cause the same issue. My opinion is |
I've created PR (#1165) which adds a setting to allow filtering paths - this could be used to prevent searching in |
@stuartleeks How would one go about implementing your PR? |
You mean how to run the PR version? If so, the way I'm using it is cloning the repo and checking out the PR branch. From there you can follow the CONTRIBUTING.md steps to install. This will allow you to configure the
|
@stuartleeks ahh, I had done everything to take your updates and import them into the current v3.30 but I wasn't seeing any improvement. Totally forgot to add that to settings. Thanks! The performance change is insanely drastic. Without your PR:
With your PR:
And this is on a 256gb ssd on my work laptop. So even though real time includes IO, that's a very real time impact for my day to day use. I'm honestly contemplating forking and uploading this fixed version to my page. |
Hi, I found this issue after hitting the same thing. Is it right that #1165 closed this issue? Users (like myself) who install the next thefuck release on WSL will still hit a borderline-unusable delay with no indication of why. To fix it, the user has to care enough to start googling instead of just abandoning the tool, track down this github issue (surprisingly nontrivial unless you have prior knowledge that the issue is WSL-specific), find the comment or the MR with the exclusion setting, and apply it. It's a huge improvement to have a setting available to resolve the issue on my box, and that's fantastic, but it's workaround, not a fix. As a crude starting point, what about defaulting
I'm not saying that's an excellent solution by any stretch, and hope it provokes better alternatives, but isn't it better than the current state? |
It would be a nice addition to Troubleshooting and useful to those that prefer not having |
I think in installation there should be a section for WSL. And under that section it should mention about that It's not the best DX to start fixing a program after installing it and this would be an easy way to improve the DX. |
That would be a nice thing to have. Any ideas how that can be done? PR's are more than welcome. |
Oh, I thought you meant the installation process. |
I tried this, as well as just using /mnt, but I'm still experiencing extremely slow performance. Has anyone come up with any other solutions/workarounds/hacks? EDIT: Almost immediately after posting this comment I noticed my path has a lot of references to /c rather than /mnt/c, changing the excluse to include '/c' improved performance to what I am used to on native Mac/Linux. |
Thanks this worked fine for me |
The output of
thefuck --version
(something likeThe Fuck 3.1 using Python 3.5.0 and Bash 4.4.12(1)-release
):Your system (Debian 7, ArchLinux, Windows, etc.):
How to reproduce the bug:
The output of The Fuck with
THEFUCK_DEBUG=true
exported (typically executeexport THEFUCK_DEBUG=true
in your shell before The Fuck):If the bug only appears with a specific application, the output of that application and its version:
It seems to be slow regardless.
Anything else you think is relevant:
I'm not really sure what would cause it to evaluate slowly, each rule import and eval only takes a couple milliseconds, so it's not the eval it feels like there's a 20 second wait for it to spin up before it starts evaluating.
The text was updated successfully, but these errors were encountered: