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

evil-escape-pre-command-hook slowing everything down #84

Open
alienbogart opened this issue Jun 23, 2018 · 2 comments · May be fixed by #91
Open

evil-escape-pre-command-hook slowing everything down #84

alienbogart opened this issue Jun 23, 2018 · 2 comments · May be fixed by #91
Labels

Comments

@alienbogart
Copy link

alienbogart commented Jun 23, 2018

(use-package evil-escape
  :ensure t
  :init
  (evil-escape-mode)
  :config
  (setq-default evil-escape-key-sequence "jk")
  (setq-default evil-escape-delay 0.2)
  (setq evil-escape-unordered-key-sequence t))

I was noticing a very annoying slowdown on my emacs operations, so I made tests with the emacs profiler. In the first one, this hook was responsible for 73% of CPU usage, even though I was just going through the file, which consisted of a series of folds mande with vimish-fold / evil-vimish-fold. I tested it again on a text file without any folds, and the hook's usage remained high, although much lower. The consisted on motioning quickly through the words of thee paragraphs of lorem ipsum generated text. When I disable evil-escape, the slowness immediately disappears.

@syl20bnr
Copy link
Owner

Can you expand the evil-escape-pre-command-hook in the profiler report to see if we can narrow down to a specific function ?

@syl20bnr syl20bnr added the bug label Jun 23, 2018
@alienbogart
Copy link
Author

alienbogart commented Aug 29, 2018

Here is the overall report (same config, different install):

evilescape00

Here is evil-escape-pre-command-hook expanded:
evilescape01

@kiennq kiennq linked a pull request Jul 4, 2019 that will close this issue
hlissner added a commit to hlissner/evil-escape that referenced this issue May 2, 2020
Fixes syl20bnr#84

Co-authored-by: kiennq <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants