logoalt Hacker News

karthinklast Wednesday at 11:04 PM1 replyview on HN

Removing the interpreter lock for a few specialized tasks (without sweeping runtime changes to Emacs) would be enough to fix most of these issues -- parsing JSON from process output into lisp data in a background thread is one candidate. [1]

Installing packages does not need to block either, there is no architectural limitation here. The Elpaca package manager for Emacs provides async, parallel package updates. Loading packages into the Lisp image will block though, there's no way around that.

The other big source of input lag is garbage collection, and there are some ongoing efforts to use the MPS library in Emacs for a copying, concurrent GC. This is a big change and I don't know if this experiment will go anywhere, but Eli Zaretskii and co are trying.

[1]: https://github.com/emacs-lsp/emacs


Replies

erk__yesterday at 8:31 AM

Someone made a alternative way of optimizing LSP by converting the JSON to elisp bytecode on the fly: https://github.com/blahgeek/emacs-lsp-booster