[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ELPA submission: plz-see
From: |
tomas |
Subject: |
Re: ELPA submission: plz-see |
Date: |
Sat, 4 Nov 2023 14:37:23 +0100 |
On Sat, Nov 04, 2023 at 06:57:54AM -0400, dick wrote:
> EZ> ... fetching a URL with our built-in primitives is too slow.
>
> Quite the contrary. Last I checked `url-retrieve` was several times
> faster than ELPA request.el (and presumably any other package that
> crudely spawns a curl instance).
The problem is that "slow" means many things for different situations.
Most of the time it just means "blocking", i.e. Emacs becomes unresponsive
while some network thing is twiddling its thumbs.
Whereas non-blocking read and write are more or less (but see below)
straightforward, a non-blocking network open (connect(2) and friends)
is surprisingly hard to get right portably [1]. Same with the resolver
(is gethostbyname going out to query DNS? Is local info sufficient?
The only non-blocking way I know of is cheaping out and punting it
to another process/thread which blocks for us (if anyone knows better
I'd like to learn :)
And, of course, if you are doing it all in one process, you've to
get used to that continuation passing style "do this request and,
on success, call that function, on failure that other". I don't
mind that, and Javascript programmers would feel right at home,
but not everyone likes that :-)
Cheers
[1] https://cr.yp.to/docs/connect.html
--
tomás
signature.asc
Description: PGP signature
- Re: ELPA submission: plz-see, (continued)
- Re: ELPA submission: plz-see, Stefan Kangas, 2023/11/03
- Re: ELPA submission: plz-see, Richard Stallman, 2023/11/03
- Re: ELPA submission: plz-see, Adam Porter, 2023/11/04
- Re: ELPA submission: plz-see, Eli Zaretskii, 2023/11/04
- Re: ELPA submission: plz-see, tomas, 2023/11/04
- Re: ELPA submission: plz-see, Eli Zaretskii, 2023/11/04
- Re: ELPA submission: plz-see, tomas, 2023/11/04
- Re: ELPA submission: plz-see, Adam Porter, 2023/11/04
- Re: ELPA submission: plz-see, Eli Zaretskii, 2023/11/04
- Re: ELPA submission: plz-see, Adam Porter, 2023/11/04
- Message not available
- Re: ELPA submission: plz-see,
tomas <=
- Message not available
- Re: ELPA submission: plz-see, tomas, 2023/11/04
- Re: ELPA submission: plz-see, Stefan Kangas, 2023/11/04
- Re: ELPA submission: plz-see, Visuwesh, 2023/11/04
- Re: ELPA submission: plz-see, tomas, 2023/11/04
- Re: ELPA submission: plz-see, tomas, 2023/11/04
- Re: ELPA submission: plz-see, Eli Zaretskii, 2023/11/04