-
-
Notifications
You must be signed in to change notification settings - Fork 960
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use zsh-async to speed-up rendering the prompt #307
Comments
Would be great to make this happened. I've been working on this. This was too hard to implement, so we've decided to release Any help on this appreciated 馃檹馃徎 |
I would almost recommend against zsh-async without a fallback, as it causes random issues on systems where zpty doesn't work properly (cygwin sorin-ionescu/prezto#1493 and Windows Subsystem for Linux sorin-ionescu/prezto#1523 are the two I know of). Maybe pure handles it differently - I'll have to check on that. |
Thanks for the insight, definitely something to consider 馃憤 I've just tried out
The difference is enormous, while spaceship is lagging as hell, pure is still instant, git status icons are slowly being rendered but that doesn't block me from changing directories, typing commands, etc. Of course in real life the difference is not that big (unless you have some really big git repositories), but the improvement would not be negligible. |
It is also possible to use some form of async without using zsh-async. Pre-async we did something like this: https://github.com/sorin-ionescu/prezto/blob/9f1a41de9015e89c5553289173e2e1a7e5a0b35d/modules/prompt/functions/prompt_sorin_setup (Note that this approach has a number of downsides - specifically, we didn't do a good job of sanitizing the data, though it should be possible to use a similar approach without introducing vulnerabilities) This is what it looks like post-async: https://github.com/sorin-ionescu/prezto/blob/ad79f78fbe143e38be421733713e562eccca018b/modules/prompt/functions/prompt_sorin_setup |
馃槥馃様馃檨 That's why I'm interested in making Spaceship async. Definitely, we should define a new roadmap for |
I have not so much time too, so it was difficult for me to implement it, sorry. I created a PR including async jobs using Perhaps it's necessary to change the way to render sections, to render them partially. |
These are what we need to implement.
|
@sei40kr any updates on this? |
Let me know if you need a beta tester. :) |
@cyrinux was a beta tester for my own implementation of async spaceship, right now there are no more known bugs so I consider it pretty stable. I made async only those sections that I personally use, but the framework is in place so it's trivial to convert more sections. Feel free to try it out if you are interested, but keep in mind that this is my fork that is made only for me, so it has breaking changes comparing to upstream (I listed them on top of the README). If you want to convert more sections, here's how to do this and I will accept the PRs, because sooner or later I hope we will integrate the async implementation back into the original project. |
Hi, |
I'm fighting async prompt on Windows / MSYS2 right now so wanted to post a nice link that I found related to this: https://github.com/agkozak/agkozak-zsh-theme#asynchronous-methods. Note that I'm not a user of Spaceship, this just came up in Google results. (I'm keeping an eye on Spaceship long-term though ;) ) |
Probably a better link: mafredri/zsh-async#26 |
Resolved by #1056 |
This has been mentioned in #200 as optional, but wasn't implemented, thus creating a tracking ticket that I can subscribe to 馃檪
Let's use zsh-async to speed-up rendering the prompt. My personal favorite is the
git_status
section (because I saw pure theme do that), but I'm sure many other sections will benefit from this too./cc @sei40kr
The text was updated successfully, but these errors were encountered: