-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Suggestions slow since 6d25df6... #164
Comments
Just saw that |
It wasn't really introduced for any great reason. I had just learned about it and thought it might be a more straightforward way to fetch the suggestion. Given the problems it created (see #120) and the fact that I didn't fully understand it, I decided to revert it.
It probably doesn't make sense to search all 500,000 history entries. Maybe the fix here is to switch back to
Basically, If you have some time, would you mind double-checking that your |
Did a quick benchmark:
For reference:
On my machine, |
According to a few tests, the `fc` builtin appears to be quite a bit faster than searching through the `$history` associative array when dealing with large history files (500K+).
Please take a look at the I also added the
I didn't think of this earlier, but would |
Looks good and is fast for me. Regarding |
Ok cool, I've merged it into the I've also added a line-item to the v0.3.3 release to add a config option for a limit on the max number of history entries to search. Thanks for your help with this! |
Thanks! I appreciate your work on zsh-autosuggestions and like how the code has improved since. Hope we can get the full completion working (a la auto-fu, see e.g. #42 ) in the near future, I'll see what I can contribute. |
Starting with 6d25df6 suggestions have become terribly slow for me. The commit switched from using
fc -m $prefix
tohistory[(R)$prefix*]
which is much slower for me. Granted, my history is not tiny (>500 000 and growing) but zsh-autosuggestions have become close-to-unusable after the change for me. I notice a delay of up to one second per keypress. Reverting the change locally gets me back to usable performance.I suppose fc's filtering is somehow optimized compared to doing history subscripting/filtering/globbing by hand?
The text was updated successfully, but these errors were encountered: