[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: async Gnus

From: Eric Abrahamsen
Subject: Re: async Gnus
Date: Tue, 25 Jan 2022 09:29:22 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Manuel Giraud <manuel@ledu-giraud.fr> writes:

> Hi,
> I'd like to have Gnus being able to fetch some mails (and news
> obviously ;-) without freezing emacs completely. I'm currently
> trying the attached dumb patch that so far seems to fly with a gnus
> demon handler like this:
> (gnus-demon-add-handler 'gnus-group-get-new-news 5 nil)
> My questions are:
>    - Is this the right place to discuss Gnus dev?


>    - This patch seems too simple: what am I missing?

It's hard to say -- no one seems to know what to expect with threads.
The main issue I can see with your code is that it only uses a single
thread, which should mean (I haven't tested it) that it provides very
little speedup. All elisp execution happens in the main thread, the only
concurrency happens with network and process communication (maybe some
other stuff), so unless you're "layering" multiple process calls in
multiple threads, everything's going to happen more or less
consecutively anyway. I think you'd need one thread per Gnus server, so
that multiple connections to external servers (IMAP or NNTP or POP)
could do their thing concurrently.

All this is just my theoretical understanding of how threads work, mind
you. Have you seen a significant speedup with this patch?

Also, bug#49065 might have some relevant code you could refer to, I
think the author was trying to do something similar there.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]