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

Performance seems to be affected by the major-mode #14

Open
ianyepan opened this issue Apr 6, 2021 · 5 comments
Open

Performance seems to be affected by the major-mode #14

ianyepan opened this issue Apr 6, 2021 · 5 comments
Labels
question Further information is requested

Comments

@ianyepan
Copy link

ianyepan commented Apr 6, 2021

I'd like to share some user experiences over the past few days of heavy coding on Emacs using this package: I realized that the scrolling performance seems to be affected by the major-mode. Specifically, programming modes (at least to my investigation) generally scroll with suboptimal performance in comparison to non-programming modes like text-mode or org-mode. I've tested it using the exact same buffer content, simply switching the modes with M-x c++mode or M-x text-mode etc.. Since I have several hooks added to programming modes, I initially wondered if it was something like "display-line-numbers-mode" or "font-lock-mode" that was causing the suboptimal performance. However, I manually disabled those minor modes to have a clean comparison and see no effect.

P.s. Suboptimal scrolling performance includes a lag between scrolling the mouse wheel and the actual scroll of the buffer. Also, sometimes the scrolling stops earlier than it's supposed to.
P.p.s. I really appreciate your effort! To the extent that I even gave this package a shoutout on Reddit haha

@ianyepan
Copy link
Author

ianyepan commented Apr 9, 2021

@io12 I found the root cause! It's lsp-mode. With lsp-mode disabled, prog-modes can scroll as perfectly smooth as any other non-programming major mode. I've also found that "tree-sitter-hl-mode" also has to some degree an influence on performance, but still the main root cause is lsp-mode.
I don't know where I should keep this issue at... as I'm not sure if this is solvable within good-scroll's scope. What do you think?

@io12
Copy link
Owner

io12 commented Apr 9, 2021

I'm not sure. You could try using Emacs's profiler to see what's slowing it down. I haven't had much time to work on good-scroll for the past few days, but I might be able to look into this more later.

@ianyepan
Copy link
Author

ianyepan commented Apr 9, 2021

I haven't had much time to work on good-scroll for the past few days, but I might be able to look into this more later.

Oh oh, no rush at all, I hope I don't come across as pressuring -- I just wanted to share my experience and see if something rings a bell. :-)

@ianyepan
Copy link
Author

ianyepan commented Apr 9, 2021

You could try using Emacs's profiler to see what's slowing it down

I'll try that and report back if I find anything.

@aspiers
Copy link

aspiers commented Apr 9, 2021

I'm biased of course, but you might find https://github.com/aspiers/etrace useful for profiling. Personally I tried both elp.el and profiler.el, and found elp.el in conjunction with these visualisations much more helpful.

@io12 io12 added the question Further information is requested label Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants