-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
[bug] Prompt takes long time on very large git repos #10
Comments
An idea, was to use |
I think that would probably be the right solution. I'll be happy to add an option that will do that in the next day or two. Thanks so much for helping me to improve Polyglot! |
Why don't you pull what I've got on the |
Indeed, it is considerably faster!
I am really happy to go from 3-4 to ~1s and I'm not even sure if there is a better/faster method ? Would love to know your thoughts. |
Out of curiosity, which shell are you using? |
I am using |
It's probably not going to get a lot better than what you proposed on |
Ah, I see. For what its worth, openbsd How does it update the prompt, if the async process finishes after the prompt has already been printed? |
You're right -- those co-processes could be very useful. I'll play around with them a bit one of these days. More than anything, I'm going to have to figure out how to have a I'd love to take on the task of making an asynchronous |
I believe you 😺 Thanks |
I don't know much about prompts and redrawing a prompt. |
Give me a little while to think about a possible spinoff In the meantime, will the change that you suggested and I added to Polyglot suffice for your purposes? If so, I'll test it out a little more and work on merging it into the |
Oh, yes, of course, it is very nice. Thanks a lot. Now I am basically looking at this as a functionality to conquer 😺 |
I merged the changes to |
sounds nice! |
Sure. Another way to do it would be to have a background process that writes the Git status to a temporary file and then triggers a |
I often need to visit a project with more than 200k files because of submodules. The untracked solution is not enough. I added a timeout for 5 seconds in the script and a "T" symbol in case of timeout. 262c262
< POLYGLOT_GIT_STATUS=$(LC_ALL=C GIT_OPTIONAL_LOCKS=0 env git status -uno 2>&1)
---
> POLYGLOT_GIT_STATUS=$(LC_ALL=C GIT_OPTIONAL_LOCKS=0 timeout 5 env git status -uno 2>&1 || echo statusTimeout)
264c264
< POLYGLOT_GIT_STATUS=$(LC_ALL=C GIT_OPTIONAL_LOCKS=0 env git status 2>&1)
---
> POLYGLOT_GIT_STATUS=$(LC_ALL=C GIT_OPTIONAL_LOCKS=0 timeout 5 env git status 2>&1 || echo statusTimeout)
268a269,271
> case $POLYGLOT_GIT_STATUS in
> *'statusTimeout'*) POLYGLOT_SYMBOLS="${POLYGLOT_SYMBOLS}T" ;;
> esa |
When working with very large repositories, specifically https://github.com/openbsd/ports, the prompt takes really long to show up.
This is not inherently an issue with polyglot as any git operation on that repository takes >3 seconds (even with a 24core, 32GB server).
Can polyglot make it so that it can kill the process by limiting the time spent to something like 0.1 seconds?
This is really making it impossible to use it right now 😿
The text was updated successfully, but these errors were encountered: