From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.devel Subject: Re: ELPA submission: plz-see Date: Sat, 4 Nov 2023 14:37:23 +0100 Message-ID: References: <3e406a2c-712d-4fee-877a-2376517619a8@alphapapa.net> <83v8ai57yj.fsf@gnu.org> <831qd56g4w.fsf@gnu.org> <877cmx4wgd.fsf@dick> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JXPQdnili+uVerMV" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28730"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: dick Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 04 14:38:15 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qzGqt-0007HV-1F for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Nov 2023 14:38:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzGqE-0004lm-KW; Sat, 04 Nov 2023 09:37:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qzGqA-0004ld-6t for emacs-devel@gnu.org; Sat, 04 Nov 2023 09:37:30 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qzGq6-0004Pd-UD; Sat, 04 Nov 2023 09:37:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject :Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=a7JDpSnWEY02L3l8UaxyMY3K3jUEACM2k9RMJy7HRgM=; b=sum6dF/qBRg3QYt4KNLFWAbTDY WVcyRkljKJAnHtA2GI0XdgfOShw5aUv+pxJEcFhddZDAqvnccmuKQihjX3seoAcLWlp02cYC8M+/9 cb9EGIEx83RLqgCXMPCT4RC17o4A1Z0P0PApCinCllmGCBEYqAbGc2WRSGSZzhJ9arDKFBaZrpipP CZkdux/eBJjbT7DqGIPabKdXEwZft2e4Qz4htJuTGa9DYrjekd+2Z8R4aKgZJJMPDjXYmCs66BOpg hS2vY/DM9vxU7heKEzZpEUE/U0/YjLfV0uPUtaIdl/vEYQ4/X1ijMdtb7fxRAWPuVKVyEPexGmeQZ VWZMZ5IQ==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1qzGq3-0000GJ-8g; Sat, 04 Nov 2023 14:37:23 +0100 Content-Disposition: inline In-Reply-To: <877cmx4wgd.fsf@dick> Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:312208 Archived-At: --JXPQdnili+uVerMV Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 04, 2023 at 06:57:54AM -0400, dick wrote: > EZ> ... fetching a URL with our built-in primitives is too slow. >=20 > 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 --=20 tom=C3=A1s --JXPQdnili+uVerMV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZUZJBwAKCRAFyCz1etHa RrS4AJ49eoWssJk5y7YbQSRtUKcGrPW8cQCggAM/kx3X1mPXrF8vTPgGokoU5zU= =eBIr -----END PGP SIGNATURE----- --JXPQdnili+uVerMV--