I “live in Emacs”, like most of us (atleast at work). It has been getting slower release on release, async support doesn’t seem to have been picked up by most packages and native-comp has made it more brittle.

Over this time, we moved from running the OS on hardware to running in VMs, so fractional slowdown was expected. But what I have is a few X slower Emacs. I had never seen Emacs take a minute to indent a few thousand lines, for example. Maybe some modes have slower code.

  • donio@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    12 days ago

    I don’t have a VM based setup but on my aging laptop:

    • Indenting a single line in a buffer with ~5K lines of code is instantaneous
    • Indenting the entire 5K line buffer using C-x h C-M-\ varies depending on the language and mode used. For elisp or fennel it’s instantaneous, for Go it’s about 1.5 second.
    • A slow case I’ve found was indenting a C or Go buffer where every line needed to be touched, this was about 7 seconds which is admittedly slower than I thought it would be
    • Indenting such a file while in c-ts-mode (so with tree-sitter enabled) is about 1s.
    • Same but using LSP and M-x eglot-format-buffer is instantaneous if a small number of fixes are required or about 1s if every line needs to be touched.