by rtpg · 2y ago · 0 comments
I theoretically understand this but having to deal with company-mode providers that, when they start performing badly, start hanging everything is not fun!
Obviously thread-count and async-codestyle-ease are not the same thing, but given the world of LSPs and plugins that do I/O on the main thread (this is a big enough reason to have async interfaces that are actually used) it would be good to have some effort spent there
Maybe for speed, `completion-at-point` would keep a fairly recent `dump-emacs-portable` image, and spin up external processes using that, with has the bonus that the completion-at-point-functions get to inspect current state.
I have a lot of issues with "pure elisp" plugins though. Things where these plugins are doing a lot of string munging, and it's fast in testing because the tests aren't that big. But you can easily hit some edge case where suddenly you're looking for occurrences of `e` in Moby Dick so now each letter press takes a second (fortunately computers are still fast!)
If completion frameworks were async-by-default, at least that stuff wouldn't hang everything for me. At least that's my theory.
For pure elisp, the worst I have seen have been around gigantic org buffers. Which, isn't too hard to split up into smaller buffers.
By far the worst case of slowdown is in gigantic log files with absurdly long lines. They made a lot of headway there in detecting the case, as I recall. I also don't think anyone ever said multithreaded would help there.