From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Sv: Emacs HTTP libraries [was: Re: How to contribute new package to GNU ELPA?] Date: Tue, 30 Mar 2021 19:21:43 +0300 Message-ID: <838s64k3xk.fsf@gnu.org> References: <87r1jxd3d8.fsf@gnu.org> <8e549f23-db75-2ef1-4399-0fb52e5efa6f@gnu.org> <87zgykn5qc.fsf@gnus.org> <83sg4ckbfw.fsf@gnu.org> <87mtukn463.fsf@gnus.org> <83o8f0kaoj.fsf@gnu.org> <83mtukk9b3.fsf@gnu.org> <2e968b98-2264-03e7-d0b2-5570c94b6fb7@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38519"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 30 18:22:30 2021 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 1lRH8Q-0009tg-5D for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Mar 2021 18:22:30 +0200 Original-Received: from localhost ([::1]:41218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRH8P-00058h-5f for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Mar 2021 12:22:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRH7T-0004W4-KV for emacs-devel@gnu.org; Tue, 30 Mar 2021 12:21:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41179) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRH7T-0008Fn-CQ; Tue, 30 Mar 2021 12:21:31 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4107 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lRH7S-0006i7-RC; Tue, 30 Mar 2021 12:21:31 -0400 In-Reply-To: <2e968b98-2264-03e7-d0b2-5570c94b6fb7@gmail.com> (message from =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel on Tue, 30 Mar 2021 12:13:55 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:267185 Archived-At: > From: Clément Pit-Claudel > Date: Tue, 30 Mar 2021 12:13:55 -0400 > > > (benchmark-run 1 (url-retrieve-synchronously > > "https://ftp.gnu.org/gnu/emacs/emacs-27.2.tar.xz")) > > > > in Emacs, and compared that with download by wget. On my relatively > > slow home connection I get almost the same times, down to less than > > 2%. > > On my decently fast home connection, Emacs takes 4.5s-5s to download that file using the form you posted, and wget takes 1.4s-2s to download the same file: > > (benchmark-run 1 (url-retrieve-synchronously "https://ftp.gnu.org/gnu/emacs/emacs-27.2.tar.xz")) > ⇒ (4.875848555 13 3.7572300619999623) But note that the actual Emacs download time was 4.876 - 3.757 = 1.319 sec, the rest was taken by GC. What happens if you set gc-cons-threshold to a very large value? Also, nowadays we have a variable to tune how much stuff do we read in one go (by default just 4K), so might as well test the effect of that on download times.