-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Performance Delay After Using z Command to Navigate Directories #84
Comments
Sorry to hear you're having this problem. It's one I don't think I've heard reported before. I'm sure we'll get it sorted out, though -- and thanks for reporting it. I don't suppose you'd be willing to share your |
@agkozak thank you so much for replying! And sorry for the late response, dunno why but i didn't get a notification. My .zshrc looks like this:
Please let me know if there is anything else I can do to further the debugging of this issue! |
Thanks for providing your Can you do an experiment for me? Run
and see if it makes a difference. When you're done playing around with that, you can return to your original configuration using
Thanks -- let me know how it goes. |
I noticed that this function runs every time I change directory, and it is complicated and do a lot of things multiple time. I just did: set -x
cd /
cd /tmp |
@jsirex Every time you press Enter at the prompt, Zsh-z reads your datafile (usually |
@kasperschnack Did you try my experiment? Have you had any success? |
Environment
Description
A delay of 2-3 seconds occurs in the shell prompt after using the
z
command to navigate to a new folder. This behavior suggests that the_zshz_update_datafile
function is performing an operation that is not completing promptly.Expected Behavior
The prompt should return immediately after navigating to a new directory using the
z
command, without any noticeable delay.Actual Behavior
After using the
z
command, there is a 2-3 second delay before the prompt reappears.Steps to Reproduce
z
command.echo "hello"
.Debug Output Snippet
The debug output indicates that the
_zshz_update_datafile
function is being executed and is likely causing the delay:+_zshz_update_datafile:56> x=/some/path
+_zshz_update_datafile:57> print -u 14 -- '/some/path|123|timestamp'
... (repeated for multiple directories)
+zshz:592> return
Possible Causes
_zshz_update_datafile
function might be inefficiently handling the update of the data file after using thez
command.Additional Information
z
functionality to navigate to a new folder, not on shell startup or when executing other commands.zshz
from.zshrc
seems to improve performance, indicating that the issue is likely within thezshz
functionality.Workaround Attempted
z
command, which is not a desirable long-term solution.Request
Guidance on how to resolve or mitigate this delay would be greatly appreciated, whether through configuration changes, optimizations, or updates to the
zshz
script.Thank you for your assistance.
The text was updated successfully, but these errors were encountered: