This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-21
Channels
- # announcements (1)
- # babashka (66)
- # beginners (37)
- # calva (3)
- # cljdoc (2)
- # clojure (14)
- # clojure-australia (6)
- # clojure-doc (4)
- # clojure-europe (22)
- # clojurescript (9)
- # datalevin (5)
- # datomic (4)
- # emacs (5)
- # events (1)
- # figwheel-main (6)
- # graalvm (41)
- # lsp (16)
- # luminus (1)
- # off-topic (2)
- # overtone (2)
- # re-frame (2)
- # reagent (8)
- # remote-jobs (1)
- # reveal (49)
- # shadow-cljs (9)
- # spacemacs (14)
- # tools-build (4)
- # tools-deps (16)
Wanna see something weird? I just ran my profiler with a stripped down spacemacs config. Scrolling down takes a lot more cpu time than scrolling up. What could be the reason for this?
Is there any way to profile at a lower level? Need some more detail as to what’s being called where.
Turning off line numbers seemed to do the trick. That sucks though, because I really like having line numbers.
It’s still very strange to me that scrolling down still costs more cpu cycles than scrolling up though. I expect it should be equal.
Now here’s what it looks like in gnu emacs with a pretty bare init file.
(setq scroll-step 1
scroll-margin 1
scroll-conservatively 100000)
I’m still baffled as to why scrolling up and down is asymmetric.I’m also baffled by just how slow adding line numbers is. Especially visual line numbers. That really makes me sad. I liked to have line numbers on so much, but I just can’t deal with the performance hit.
I just set my line-numbers-width to 3 and it’s still slow as hell. Using emacs 27.2, but this problem also exists on emacs-28 and higher as well.
There are tons of tiny things; separately, each may look rather insignificant. When they are pulled in all at once, it becomes a problem. See, for example: hl-line - it works fine in Linux, on a Mac it slows down things, just enough to see the difference. which-key sometimes adds almost 30% overhead - especially if used in posframe mode. CIDER adds more things that increase latency. if you use lsp-mode - that too. I recently switched to Doom (after several years of Spacemacs) because I felt tired hunting down every single hook, advice, and feature that doesn't add significant utilitarian value for me. Spacemacs does a lot. Doom has its own problems, and switching to it wasn't completely smooth and painless for me. I wouldn't recommend switching to Doom if you already invested in Spacemacs. If you want performance - hunt down every single thing you don't need. Try disabling minor modes. Remove hooks, de-advice functions.
> I liked to have line numbers on so much
don't use linum-mode, use built-in (since v27) display-line-numbers-mode
instead. linum is too slow
@c.westrom Scrolling a buffer is not a very efficient with Emacs in general. Page up/down should be faster as is jumping to different locations in the buffer. There are many ways to configure smoother scrolling for Emacs - https://www.emacswiki.org/emacs/SmoothScrolling However, its still more efficient to learn how to navigate code rather than scrolling https://practical.li/spacemacs/navigating-code/