spacemacs

erwinrooijakkers 2023-07-27T20:00:29.165419Z

My Spacemacs became very very slow yesterday… I changed nothing (same version of Emacs same version of Spacemacs) but now it freezes a lot. I reinstalled ~/.emacs.d but problem persists…

practicalli-johnny 2023-07-28T00:11:53.639569Z

The only issue I am aware of is a possible conflict when using Clojure-lsp and Clojure-mode (CIDER), specifically when moving the cursor inside/at the start of a comment form

practicalli-johnny 2023-07-28T00:13:16.165699Z

There could also be other conflicting aspects of ClojureLSP and CIDER, especially if both are trying to format the Clojure code

erwinrooijakkers 2023-07-28T18:07:59.953939Z

thanks @jr0cket. in my case it was related to a growing savehist file as pointed out by jahson… See https://github.com/syl20bnr/spacemacs/issues/9409

practicalli-johnny 2023-07-28T19:02:09.602229Z

Thanks for the update. It seems useful to add some limits on the save history file sizes. I've created an issue to update the practicallii/spacemacs-config with the suggested limits https://github.com/practicalli/spacemacs-config/issues/9

👍 1
erwinrooijakkers 2023-07-27T20:02:34.469529Z

I could try profiling I guess first, but just no idea where to start

erwinrooijakkers 2023-07-27T20:02:38.311639Z

Other applications work fine

erwinrooijakkers 2023-07-27T20:06:04.881439Z

profiler-start and then hopping around doing text operations in an initially empty text file till screen freezes, when it unfreezes profiler-stop and then profiler-reportgives this output… (no idea what command-execute is and clicking on it does nothing)

erwinrooijakkers 2023-07-27T20:09:42.815389Z

I do see this log message:

2023-07-27 22:01:59.624 Emacs-x86_64-10_14[59952:507496] It's not legal to call -layoutSubtreeIfNeeded on a view which is already being laid out.  If you are implementing the view's -layout method, you can call -[super layout] instead. Break on void _NSDetectedLayoutRecursion(void) to debug.  This will be logged only once.  This may break in the future.

erwinrooijakkers 2023-07-27T20:10:04.388409Z

but that was there earlier as well when it did not freeze

erwinrooijakkers 2023-07-27T20:10:14.729149Z

hopefully anybody can give me some pointers because I have no idea

erwinrooijakkers 2023-07-27T20:10:26.953279Z

might just reinstall emacs otherwise

practicalli-johnny 2023-07-28T00:09:27.309209Z

Unless there is some specific action that causes the freeze, then I'd suggest it's the distribution of Emacs being used (there can quite a few Emacs versions and distributions depending on OS), or native compilation (due to OS library changes) https://practical.li/spacemacs/install-spacemacs/pre-install/#install-emacs Emacs 28 is probably the most reliable, although I've used 29 and 30 without freezing on Linux, both later versions built from source

erwinrooijakkers 2023-07-28T08:25:04.292339Z

thanks, I used https://emacsformacosx.com/

erwinrooijakkers 2023-07-28T08:26:43.282089Z

and run via ec <file name> with

alias emacsclient="/Applications/Emacs.app/Contents/MacOS/bin/emacsclient -c -a '/Applications/Emacs.app/Contents/MacOS/Emacs'"
alias ec='emacsclient'

erwinrooijakkers 2023-07-28T08:27:48.345279Z

I will reinstall and see

2023-07-28T16:40:00.401489Z

I kinda recall some issues with emacsformacosx. Over the time I’ve migrated to emacs-plus@29 installed via homebrew.

erwinrooijakkers 2023-07-28T17:25:24.154299Z

yes I actually installed that one, thanks

erwinrooijakkers 2023-07-28T17:26:45.735109Z

unfortunately after starting spacemacs again the problem comes again

erwinrooijakkers 2023-07-28T17:27:29.970939Z

around 100% CPU and freezes

2023-07-28T17:30:25.790029Z

Maybe something related? https://github.com/syl20bnr/spacemacs/issues/9409#issuecomment-1084039955

erwinrooijakkers 2023-07-28T17:31:43.039429Z

it’s 240 MB in my case

2023-07-28T17:33:29.976379Z

Does issue persists if you use clean .spacemacs config?

erwinrooijakkers 2023-07-28T17:35:06.371449Z

don’t know I could check later, but in the issue you linked someone says this: > “In my case my savehist ballooned to 1.6GB from 80kB as PNG data somehow got into the kill ring while editing an org file:”

erwinrooijakkers 2023-07-28T17:35:20.831469Z

my issues also popped up during working in an org file

erwinrooijakkers 2023-07-28T17:36:41.369449Z

after removing the ~/.emacs.d/.cache/savehist the issue is gone

erwinrooijakkers 2023-07-28T17:39:19.329259Z

thanks a lot for the suggestions @jahson this issue was very related 🙂 not sure yet why savehist blows up, but at least this is a way to make it fast again

👍 1
erwinrooijakkers 2023-07-28T17:48:34.960429Z

The reason why a clean install did not work is that I did not remove the savehist file before. I executed rm -rf * in ~/.emacs.d/, but this does not remove the hidden files like savehist. I do suspect the savehist file growing is related to me editing a large org file, since I first noticed in an org file and the other user in the issue reports the same, but not sure. Anyway, thanks a lot all 🙂