GNU bug report logs - #58302
29.0.50; browse-url-emacs is extremely slow (and I think always has been?)

Previous Next

Package: emacs;

Reported by: Phil Sainty <psainty <at> orcon.net.nz>

Date: Wed, 5 Oct 2022 11:08:02 UTC

Severity: normal

Found in version 29.0.50

Full log


Message #26 received at 58302 <at> debbugs.gnu.org (full text, mbox):

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 58302 <at> debbugs.gnu.org
Subject: Re: 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
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: #<buffer  *http www.example.com:80*> 
[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: #<buffer  *http www.example.com:80*> 
[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: #<buffer  *http www.example.com:80*> 
[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: #<buffer  *http www.example.com:80*> 
[HEAD]
======================================================================
1 -> (url-retrieve-synchronously "http://www.example.com") [nil]
1 <- url-retrieve-synchronously: #<buffer  *http www.example.com:80*> 
[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: #<buffer  *http www.example.com:80*> 
[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: #<buffer  *http www.example.com:80*> 
[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: #<buffer  *http www.example.com:80*> 
[HEAD]





This bug report was last modified 2 years and 307 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.