Fork me on GitHub
Drew Verlee16:02:49

What are some common ways to keep spacemacs as snappy and fast as possible? I realize this is something of an impossible question, but maybe there are some easy wins. Like if it was the jvm maybe you would check how much mem was allocated. Or how in most projects having as few deps as possible usually helps.


Profile Emacs to see if there is any issues seems to be a common approach


The scorched earth approach would be to backup your config and reinstall from scratch. Test without applying any of your own configuration and steadily add your customisations back in to see if there is an impact


Less drastic would be to remove any config and packages not needed. Also clean out the .cache files


Removing unused layers shouldn't make any difference, as its all lazy loaded. It could be possible that a package in a layer is causing problems. This package could be excluded by adding the package name to dotspacemacs-excluded-packages although this might break some functionality.


I added some font rendering optomisations to dotspacemacs/user-config but not sure if they made any real difference.


If using MacOSX, then some versions of Emacs are not that fast when running Spacemacs. These seem to be the recommended versions


A potentially significant change is to switch to Ivy for completion, rather than helm. I believe this is done by adding the ivy layer and removing the helm layer in the Spacemacs configuration layers. Ivy is a sub-set of the features of helm, so you may or may not miss those features.


Oh, and of course, update Spacemacs code, your Spacemacs config against the template (`SPC f e D`) and get the latest packages (`SPC f e U`) to get the latest updates and improvements (but dont update when you are busy in the rare case that there is an issue)


Finally, use Emacs 28 with native compilation. This may speed things up or break things (or both)

👀 2
Diego Naya19:02:39

I had a great speedup migrating from emacs27 (the std package in fedora 35) to emacs 28 (had to install an outside package)

Drew Verlee22:02:45

Thanks a ton! I'm definitely going to try these ideas over the weekend.

Drew Verlee22:02:16

Moving around my project has been sluggish and that's a mental drag i don't need.

Drew Verlee03:02:23

ok wow. yea. i'm on 28 right now and it feels snapper. That or i'm just excited its Friday. time will tell i suppose.

🎉 1

I am curious to understand what is sluggish when moving around projects. What commands are used?


Nothing like a new installation to give a sense of speed 😁 All those newly downloaded and complied Emacs pages should help, even more so if the packages were natively compiled (something I haven't tried yet)

Drew Verlee13:02:36

Just normal text movement (evil mode up down etc..) had delays i was noticing. I didn't run profiler and collect samples so I'm not sure how often it was happening or why. But 28 feels faster right out of the box for me. I used the snap from ubuntu which i read is natively compiled.