-
Notifications
You must be signed in to change notification settings - Fork 37
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
Scrolling in switch to buffer causes extreme lag when ivy-rich-mode is on #87
Comments
Same here on Windows 10, Emacs 27 with Doom Emacs. Its really slow when you move selection in any For me navigating Holding down arrow key in buffer list (~50 buffers):
EDIT: Even cycling over as few as 5 buffers introduce serious lag. |
This looks familiar: doomemacs/doomemacs#1317 |
I am also experiencing the same lag. Based on your profiler output I think (defvar ivy-rich--ivy-switch-buffer-cache
(make-hash-table :test 'equal))
(define-advice ivy-rich--ivy-switch-buffer-transformer
(:around (old-fn x) cache)
(let ((ret (gethash x ivy-rich--ivy-switch-buffer-cache)))
(unless ret
(setq ret (funcall old-fn x))
(puthash x ret ivy-rich--ivy-switch-buffer-cache))
ret))
(define-advice +ivy/switch-buffer
(:before (&rest _) ivy-rich-reset-cache)
(clrhash ivy-rich--ivy-switch-buffer-cache)) It is clearly still slow when a new candidate is shown, but it's better than nothing. |
To make things even more seemless and also faster the first time
|
Apologies for the noob question, but should I include both @haji-ali and @ErkiDerLoony's code in my .config file (I'm running Doom), or just @ErkiDerLoony's. Thanks. |
@ErkiDerLoony’s code is enough (and more sophisticated). |
Got it, thanks!
…On Tue, Jan 26, 2021 at 1:13 PM Abdul-Lateef Haji-Ali < ***@***.***> wrote:
@ErkiDerLoony <https://github.com/ErkiDerLoony>’s code is enough (and
more sophisticated).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#87 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCKRSJC72L62OGIJHLY7G3S34H6DANCNFSM4OS75K3A>
.
|
This is unbearable and it can cause Emacs to freeze for seconds but when I turn ivy-rich-mode off there are no lags. I am using Emacs 28.0.5 (HEAD) if that helps. Scrolling in M-x also causes lags but not nearly as severe.
The text was updated successfully, but these errors were encountered: