From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#58302: 29.0.50; browse-url-emacs is extremely slow (and I think always has been?) Date: Thu, 13 Oct 2022 00:28:20 +1300 Message-ID: <62e7deefa46f031798e6bf6ea927e7dc@webmail.orcon.net.nz> References: <929023db7615cc93faad294e3860ba5f@webmail.orcon.net.nz> <87edvlxgeg.fsf@gnus.org> <18018e9dddf6e6d5d07a567a36b59a65@webmail.orcon.net.nz> <8735bte21s.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2608"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Orcon Webmail Cc: 58302@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 12 13:29:14 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1oiZvG-0000Wf-CQ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Oct 2022 13:29:14 +0200 Original-Received: from localhost ([::1]:54136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiZvE-0002lD-OU for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Oct 2022 07:29:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiZv4-0002kH-NB for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2022 07:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiZv4-0007cU-FL for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2022 07:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oiZv4-0000MN-9S for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2022 07:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Oct 2022 11:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58302 X-GNU-PR-Package: emacs Original-Received: via spool by 58302-submit@debbugs.gnu.org id=B58302.16655741051340 (code B ref 58302); Wed, 12 Oct 2022 11:29:02 +0000 Original-Received: (at 58302) by debbugs.gnu.org; 12 Oct 2022 11:28:25 +0000 Original-Received: from localhost ([127.0.0.1]:55914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiZuT-0000LX-Fx for submit@debbugs.gnu.org; Wed, 12 Oct 2022 07:28:25 -0400 Original-Received: from smtp-2.orcon.net.nz ([60.234.4.43]:52293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiZuQ-0000LO-Gi for 58302@debbugs.gnu.org; Wed, 12 Oct 2022 07:28:24 -0400 Original-Received: from [10.253.37.70] (port=42048 helo=webmail.orcon.net.nz) by smtp-2.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1oiZuO-0005oj-GI; Thu, 13 Oct 2022 00:28:20 +1300 Original-Received: from ip-116-251-140-135.kinect.net.nz ([116.251.140.135]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Thu, 13 Oct 2022 00:28:20 +1300 In-Reply-To: <8735bte21s.fsf@gnus.org> X-Sender: psainty@orcon.net.nz X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245193 Archived-At: On 2022-10-13 00:03, Lars Ingebrigtsen wrote: > I think the conclusion here is that using the file-name-handler-alist > stuff for this is the absolutely pessimal way to implement > `browse-url-emacs'. > > It should be pretty easy to rewrite browse-url-emacs to just call > `url-retrieve-synchronously' explicitly, and then display the resulting > data -- and it should be much, much faster. Undoubtedly so; but making the existing approach more efficient might also bring the same benefits to other functionality? E.g.: (url-handler-mode 1) (trace-function 'url-retrieve-synchronously "*trace-output*" (lambda () (format " [%s]" url-request-method))) (find-file "http://www.example.com") ====================================================================== 1 -> (url-retrieve-synchronously #s(url "http" nil nil "www.example.com" nil "" nil nil t nil t t)) [OPTIONS] 1 <- url-retrieve-synchronously: # [OPTIONS] ====================================================================== 1 -> (url-retrieve-synchronously #s(url "http" nil nil "www.example.com" nil "" nil nil t nil t nil)) [HEAD] 1 <- url-retrieve-synchronously: # [HEAD] ====================================================================== 1 -> (url-retrieve-synchronously #s(url "http" nil nil "www.example.com" nil "" nil nil t nil t t)) [OPTIONS] 1 <- url-retrieve-synchronously: # [OPTIONS] ====================================================================== 1 -> (url-retrieve-synchronously #s(url "http" nil nil "www.example.com" nil "" nil nil t nil t nil)) [HEAD] 1 <- url-retrieve-synchronously: # [HEAD] ====================================================================== 1 -> (url-retrieve-synchronously "http://www.example.com") [nil] 1 <- url-retrieve-synchronously: # [nil] ====================================================================== 1 -> (url-retrieve-synchronously #s(url "http" nil nil "www.example.com" nil "" nil nil t nil t t)) [HEAD] 1 <- url-retrieve-synchronously: # [HEAD] ====================================================================== 1 -> (url-retrieve-synchronously #s(url "http" nil nil "www.example.com" nil "" nil nil t nil t t)) [HEAD] 1 <- url-retrieve-synchronously: # [HEAD] ====================================================================== 1 -> (url-retrieve-synchronously #s(url "http" nil nil "www.example.com" nil "" nil nil t nil t t)) [HEAD] 1 <- url-retrieve-synchronously: # [HEAD]