This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-07-08
Channels
- # announcements (16)
- # beginners (22)
- # calva (3)
- # cider (17)
- # clojure (2)
- # clojure-berlin (1)
- # clojure-denmark (4)
- # clojure-dev (4)
- # clojure-europe (22)
- # clojure-madison (1)
- # clojure-nl (2)
- # clojure-norway (34)
- # clojure-sweden (3)
- # clojure-uk (3)
- # clojurescript (9)
- # datomic (7)
- # deps-new (1)
- # events (1)
- # fulcro (1)
- # hyperfiddle (10)
- # lsp (43)
- # missionary (1)
- # off-topic (27)
- # pedestal (10)
- # polylith (1)
- # reitit (4)
- # releases (1)
- # squint (18)
- # xtdb (8)
Does anyone have a slow moving cursor in emacs with lsp-mode
when you hit the up or down arrow? When I disable lsp, it's normal again
Nope. Have you ran the profiler?
1. M-x profiler-start
, choose cpu
2. scroll up and down for a while
3. M-x profiler-stop
4. M-x profiler-report
you can use tab
to expand those +
to see the call stack and maybe identify some lsp-*
taking a large %
just for reference here's what it looks on my machine running on WSL (sure, comparing different emacs setups is pointless but still)
Maybe start with wiping all emacs caches and built stuff? I've found that can sometimes "fix" mysteries.
I'd try expanding that command-execute
branch and see what's eating up the cpu there
https://github.com/DarwinAwardWinner/ido-completing-read-plus/blob/5995b4605b4f2d568489491704ef21bc49ddecd5/ido-completing-read%2B.el#L834 I think it comes from here, perhaps?
or expand the tree further, as those ido functions seem to just add advice wrappers which show up in the call stack when running interactive commands
iow. check if you can expand that #<compiled 0xbf...>
node and see whats under it
yeah, that's possible. I've bound the profiler functions to F9-F11 to work around that
at least some of that stuff seems to related to updating the mode line, perhaps try if something like (setq lsp-modeline-code-actions-enable nil)
has any effect? (https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/)
let me put it like this. go to a reasonably dense clojure file. move up and down with cursor. switch to text-mode. do you feel the difference?
I enabled some lsp(-ui) settings (`lsp-headerline-breadcrumb-enable`, lsp-modeline-code-actions-enable
, lsp-ui-sideline-*
) (I've normally disabled most of the UI stuff) and set lsp-idle-delay
from 0.5
to 0.01
-> scrolling up and down still feels fast but I get a similarish profiler report as you (especially that compiled -> mapc -> compiled -> lsp--parser-on-message -tree). My cpu usage on a couple of cores goes up, but the same happens on text-mode
:man-shrugging:
it could also be that I'm simply hitting memory limits, while working on an application on a 16gb machine
time to rename emacs to sgacs 🙂
emacs = eight megabytes and constantly swapping -> sixteen gigabytes and constantly swapping
I downloaded emacs-mac again via brew install --cask and the problem vanished. Note to self: don't use emacsforosx again
It's no fun when you dread using your clojure development environment because of an issue like this
You must have been operating below 10 borks, when you usually hover at around 10000. Glad you are back in borkness!
well, I was away for a vacation anyway, but I dreaded going back to that slow editor...
Hi folks,
I'm using a re-frame tracing fn-traced
and I have set in .clj-kondo/config.edn to lint as fn
{:lint-as {day8.re-frame.tracing/fn-traced clojure.core/fn}}
This works but the formatting is not working as expected:
;; what I get: Wrong!
(rf/reg-event-fx
:initialize
(fn-traced [_ _]
{}))
;; how it should be: OK!
(rf/reg-event-fx
:initialize
(fn-traced [_ _]
{}))
;; what I get with fn: OK!
(rf/reg-event-fx
:initialize
(fn [_ _]
{}))
What am I missing to format it correctly as fn
?