Skip to content
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

The very large delay caused by resh. #161

Open
hongyi-zhao opened this issue Aug 28, 2021 · 4 comments
Open

The very large delay caused by resh. #161

hongyi-zhao opened this issue Aug 28, 2021 · 4 comments

Comments

@hongyi-zhao
Copy link

hongyi-zhao commented Aug 28, 2021

After I've installed resh, the latency between two consecutive commands can become very high, as shown below:

werner@X10DAi-00:~$ time cd

real	0m0.212s
user	0m0.104s
sys	0m0.126s
werner@X10DAi-00:~$ 

Any hints for this problem?

Regards,
HY

@curusarn
Copy link
Owner

That is very weird. RESH really shouldn't add that much time.

What OS are you running?
What is the version of your bash?
Are you running some other things after every command?

Just for reference, my machine (with resh):

[simon@simon-x1 ~]$ time cd

real	0m0.028s
user	0m0.021s
sys	0m0.011s

@hongyi-zhao
Copy link
Author

hongyi-zhao commented Nov 27, 2021

What OS are you running?

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal

What is the version of your bash?

$ bash --version
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)

Are you running some other things after every command?

I'm currently switched to ariadne, and no further analysis and research were carried out on resh.

@tivvit
Copy link
Contributor

tivvit commented Oct 15, 2022

I have an idea about what may cause this.

Resh calls git for each command (to get if you are in a git repo). If you are in a huge repository git may be slow (the same happens for some git-related ZSH plugins).
The call

local __RESH_GIT_REMOTE; __RESH_GIT_REMOTE="$(git remote get-url origin 2>/dev/null)"

is it possible that it is what happened @hongyi-zhao ?

@hongyi-zhao
Copy link
Author

hongyi-zhao commented Oct 16, 2022

Nope. The command is executed very quickly in my case:

werner@X10DAi-00:~/Public/repo/github.com/ApolloAuto/apollo.git$ time git remote get-url origin 2>/dev/null
https://github.com/ApolloAuto/apollo.git

real	0m0.087s
user	0m0.055s
sys	0m0.031s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants