A lot of very useful software is not multithreaded. Hell, javascript is not multi-threaded.
I believe every major UI toolkit in use is single threaded.
If you want a multithreading Emacs contribute to https://github.com/lem-project/lem. That will probably get you there faster than with Emacs.
Truth is it isn’t Emacs that you want, but the features it has. Just replicate them in Lem.
No, but it would be nice to have some day in the near future.
Yeah it sucks that this is missing, but on the other hand you have Emacs server and clients to circumvent this.
I dream of a world gnus wont hang emacs.
I live in that world by outsourcing article fetching to external services and storing all messages/articles locally. The basic setup is this:
Emails:
- Offlineimap syncs 2 Gmail accounts and connects directly to…
- Dovecot as an IMAP server. Dovecot, stores the emails in Maildir format and Gnus’s nnimap backend gets them from the local Dovecot server.
RSS/Atom feeds:
- A program called Feed2exec saves RSS and Atom feeds in Maildir format. Dovecot monitors those folders and serves them to nnimap along with the emails. There is at least one other program that fetches newsfeeds to Maildir, but Feed2exec is in debian.
All 3 of these services do their job regardless of whether Emacs is running, and nnimap is super fast when the server is local.
I don’t read actual newsgroups anymore. If I did, I’d install Leafnode for them. But I wonder if the nntp backend would benefit to the same extent that nnimap does.
I’m also using Gnus with IMAP directly too but connecting to a remote Dovecot on my root server. Fetching takes maybe 1 or 2 seconds at max.
I filter all my mails on my server before hand.
I guess you should try Commercial Emacs, then.
If the author could only communicate better and bring his changes upstream…
I tried to see what do make of his first patch against Emacs 28 that bring threading to Gnus however it was quite hard to rebase/split them up as the original patch was just one big blob.
E.g. he doesn’t just add threading to Gnus but also remove or rename variables, e.g. secondary select methods. He doesn’t explain changes, he adds unnecessary or rude comments to the commits or code.
I didn’t say it would be easy. ;)
Dealbreaker? No. Major issue? Yes.
Anything over network really needs multithreading. The async hacks are ok, but eventually everything has to sync up again, which is a giant freeze on everything.
Networking activity is a prime example of something where threading is least likely to be a clearly superior solution. Heavy CPU use is where threading may be the superior choice and a single event-loop thread is not. IO waiting is not.
What evidence do you have for this?
Magit
Since I use Emacs solely for text creation/manipulation, and I don’t know what multithreading is, I voted No.
The only “performance” issue for me is lsp - but that tends to be at first run on a large framework. And since my “old” laptop (x1c6) is about 1000x faster than the one I started using emacs on in the early 2000s it really isnt an issue.
Less haste, more speed…
It might not be a dealbreaker for me per say, but it’s absolutely something that should be included one day.
Out of curiosity - what are your use-cases where the lack of multi-threading is an issue?
Tramp
No detail in your response. How would Tramp benefit from multithreading in any way that isn’t achievable already with an asynchronous approach?
Are you sure the problem there is threading? I’m pretty sure it is not. There’s very little CPU usage. The problem is TRAMP is written synchronously when it should be asynchronous, not that it doesn’t have threads.
at least emacs needs two threads, one for rendering interface and one for the lisp interpreter. this isn’t the multi threading some people hope for but this is much easier to implement and at face level it hides freezes.
And wouldn’t work, given that except for the actual pushing pixels to the screen everything else is done by the Lisp code. So you would need to tightly synchronize the two threads to the point of it being useless.
Having a separate “rendering” thread works for applications where you can queue up rendering tasks and then execute them in the background. Such as a game engine.
Not an interactive text editor that has not been designed with such architecture in mind because threads didn’t even exist back in the day.
It’s the biggest obstacle for sure. If we had multithreading I would go all in
All in on what?
Every time emacs starts to chug I shrug and spin up vim. Maybe I could make that happen less often if I spent a while de-bloating and shopping around for faster packages, but as long as UI is trapped in the same thread as everything else I just don’t think I can pull off the sort of optimization that’ll make emacs snappy everywhere I’d like it to be. And cpu performance is ever skewing towards more cores than faster cores, at least for AMD. Emacs is underwater and still sinking, it seems; and much as I’d like to invest so many hours making it my one-stop editing shop I have no intention of going down with the ship.
But hell if emacs were multithreaded I would run EXWM
What threaded applications are you using in Vim?
None. Vim is zippy as shit. Emacs stutters on files an order of magnitude smaller than it takes to slow down Vim. In no small part because my Emacs is bloated but I like my Vim minimalist, but still mainly just because Vim is faster than Emacs period, and not by a little.
I don’t mean no MT is a hard pass on Emacs for me obviously. But every time I pass up Emacs to use another editor it’s a performance issue which multithreading would take care of handily, even if it went no further than a separate thread for the UI.
None. Vim is zippy as shit. Emacs stutters on files an order of magnitude smaller than it takes to slow down Vim. In no small part because my Emacs is bloated but I like my Vim minimalist, but still mainly just because Vim is faster than Emacs period, and not by a little.
I don’t mean no MT is a hard pass on Emacs for me obviously. But every time I pass up Emacs to use another editor it’s a performance issue which multithreading would take care of handily, even if it went no further than a separate thread for the UI.
I stay away from stupid plugins that block my main thread, so of course it’s a deal breaker. I want to use those shitty plugins whose authors don’t know what they are doing.
For professional work, yes, for just goofing off at home, no
You’ll need to explain that to those of us who use Emacs for professional work. What fails for you? In particular, what fails that needs threading to be resolved?
The part where I need to type something, but the process is blocked
I think the question is malformed. It’s obviously not a deal breaker for the vast majority of the people in this subreddit, but I bet a good percentage of people would enjoy it.
I’m gonna vote yes. I’ve been using Emacs since 2008, but if I had to start again today I would probably not pick it up, lack of multithreading is partially why.