all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: tomas@tuxteam.de
To: dick <dick.r.chiang@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: ELPA submission: plz-see
Date: Sat, 4 Nov 2023 14:37:23 +0100	[thread overview]
Message-ID: <ZUZJE6codKYQfl2D@tuxteam.de> (raw)
In-Reply-To: <877cmx4wgd.fsf@dick>

[-- Attachment #1: Type: text/plain, Size: 1317 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  parent reply	other threads:[~2023-11-04 13:37 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-30  7:17 ELPA submission: plz-see Augusto Stoffel
2023-10-30 11:56 ` Eli Zaretskii
2023-10-31  8:09   ` Augusto Stoffel
2023-10-31  8:43   ` Philip Kaludercic
2023-10-31 20:17     ` Augusto Stoffel
2023-11-01  9:14       ` Philip Kaludercic
2023-11-01 18:36         ` Augusto Stoffel
2023-11-01 20:21           ` brickviking
2023-11-03  2:31             ` Richard Stallman
2023-11-03  6:32               ` brickviking
2023-11-03  7:50                 ` Philip Kaludercic
2023-11-03  8:06                   ` Eli Zaretskii
2023-11-03 14:46                     ` Adam Porter
2023-11-04  1:10                       ` Stefan Kangas
2023-11-04  2:10                     ` Richard Stallman
2023-11-04  5:08                       ` Adam Porter
2023-11-04  6:49                         ` Eli Zaretskii
2023-11-04  8:51                           ` tomas
2023-11-04  9:07                             ` Eli Zaretskii
2023-11-04  9:34                               ` tomas
2023-11-04 13:30                               ` Adam Porter
2023-11-04 13:56                                 ` Eli Zaretskii
2023-11-04 14:38                                   ` Adam Porter
     [not found]                               ` <877cmx4wgd.fsf@dick>
2023-11-04 13:37                                 ` tomas [this message]
     [not found]                                   ` <8734xlmwsm.fsf@dick>
2023-11-04 14:24                                     ` tomas
2023-11-04 10:38                             ` Stefan Kangas
2023-11-04 12:28                               ` Visuwesh
2023-11-04 13:17                                 ` tomas
2023-11-04 13:13                               ` tomas
2023-11-04  6:47                       ` Eli Zaretskii
2023-10-30 22:33 ` Stefan Kangas
2023-10-31  8:09   ` Augusto Stoffel
2023-11-01  0:37     ` Stefan Kangas
2023-11-01  7:29       ` Augusto Stoffel
2023-11-01 20:23         ` Stefan Kangas
2023-10-31  9:33 ` Mauro Aranda
2023-10-31 20:19   ` Augusto Stoffel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZUZJE6codKYQfl2D@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=dick.r.chiang@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.