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

Emacs gets incredibly slow when rainbow-delimiters are enabled #43

Open
amukiza opened this issue Oct 12, 2014 · 10 comments
Open

Emacs gets incredibly slow when rainbow-delimiters are enabled #43

amukiza opened this issue Oct 12, 2014 · 10 comments

Comments

@amukiza
Copy link

amukiza commented Oct 12, 2014

No description provided.

@Fanael
Copy link
Collaborator

Fanael commented Oct 12, 2014

Any details? Without them, all I can do is to close the ticket as WORKSFORME.

@amukiza
Copy link
Author

amukiza commented Oct 12, 2014

I just realized that I could no longer scroll more that 10lines before the cursor stopped and got stuck only to appear further down the buffer. Now this has only been happening in clojure mode where I have rain-bow delimiters enabled so I decided to deactivate them for a bit and the speed was okay.

I am using the latest emacs (installed using --use-git-head). I am afraid thats all the details I can give, but I would appreciate if somebody took a look into this. I am an emacs newbie so it can't be me.

@Fanael
Copy link
Collaborator

Fanael commented Oct 12, 2014

Can't reproduce on leiningen-core/src/leiningen/core/project.clj, which is the biggest Clojure file I could find. Are you sure you're using the current version of rainbow-delimiters?

@amukiza
Copy link
Author

amukiza commented Oct 12, 2014

Yes, I just cleaned out all my packages in elpa/ directory and re installed. And I still get the same issue. the clojure file am working with is not so large its a few hundred lines, not more than a thousand.

@Fanael
Copy link
Collaborator

Fanael commented Oct 12, 2014

Can you show the source file?

the clojure file am working with is not so large its a few hundred lines, not more than a thousand.

Sounds like leiningen-core/src/leiningen/core/project.clj is bigger, then, so it should trigger the problem too.

I just realized that I could no longer scroll more that 10lines before the cursor stopped and got stuck only to appear further down the buffer.

What exactly do you mean by "scroll"? Using the scroll-bar? Using {next,previous}-line? Something else? Where was the point positioned? I need precise instructions to be able to reproduce the issue.

@Fanael
Copy link
Collaborator

Fanael commented Oct 12, 2014

Just to make sure: you got rainbow-delimiters from MELPA, right? The version on Marmalade is a very old version with third-party modifications.

@amukiza
Copy link
Author

amukiza commented Oct 13, 2014

What I meant by 'scroll' was ... just using arrow keydown actually scrolling up is okay. I have Marmalade and melpa in my package-arhive list but I am sure i have the melpa version.
screen shot 2014-10-13 at 8 36 54 am

@Fanael
Copy link
Collaborator

Fanael commented Oct 13, 2014

As I said, I can't reproduce it on leiningen-core/src/leiningen/core/project.clj. In fact, profiling yields the following results:

rainbow-delimiters-propertize                         70          0.1042879999  0.0014898285
rainbow-delimiters-apply-color                        3760        0.0200349999  5.32...e-006
rainbow-delimiters-propertize-delimiter               3760        0.0120246     3.19...e-006
rainbow-delimiters-syntax-ppss                        70          0.0110135     0.0001573357
rainbow-delimiters-syntax-ppss-run                    70          0.0110135     0.0001573357
rainbow-delimiters-char-ineligible-p                  3820        0.0110037     2.88...e-006
rainbow-delimiters-depth-face                         3760        0.0040153     1.06...e-006
rainbow-delimiters-mode                               2           0.0           0.0
rainbow-delimiters-escaped-char-predicate-lisp        3760        0.0           0.0
rainbow-delimiters-make-syntax-table                  2           0.0           0.0
rainbow-delimiters-mode-turn-on                       2           0.0           0.0
rainbow-delimiters-mode-turn-off                      1           0.0           0.0
rainbow-delimiters-depth                              70          0.0           0.0

That's 0.1s total spent in rainbow-delimiters when scrolling from the beginning to the end by holding down the down arrow key.

Can you post the problematic source code? Can you post the list of enabled minor modes as shown by describe-mode (C-h m)? Can you evaluate the following expression and post the result?

(let ((vars nil))
  (mapatoms
   (lambda (symbol)
     (when (and
            (string-match-p (rx string-start (or "font-lock-" "jit-lock-"))
                            (symbol-name symbol))
            (boundp symbol))
       (push (cons symbol (symbol-value symbol)) vars))))
  (sort vars (lambda (l r)
               (string-lessp (car l) (car r)))))

@Fanael
Copy link
Collaborator

Fanael commented Oct 22, 2014

Ping.

@Fanael
Copy link
Collaborator

Fanael commented Oct 26, 2014

Development has moved to https://github.com/Fanael/rainbow-delimiters. If the issue still persists, please report it there.

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

2 participants