unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Phil Sainty <psainty@orcon.net.nz>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 58302@debbugs.gnu.org
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	[thread overview]
Message-ID: <62e7deefa46f031798e6bf6ea927e7dc@webmail.orcon.net.nz> (raw)
In-Reply-To: <8735bte21s.fsf@gnus.org>

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]






  reply	other threads:[~2022-10-12 11:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-05 11:07 bug#58302: 29.0.50; browse-url-emacs is extremely slow (and I think always has been?) Phil Sainty
2022-10-06 12:53 ` Lars Ingebrigtsen
2022-10-06 23:25   ` Phil Sainty
2022-10-07 11:48     ` Lars Ingebrigtsen
2022-10-07  2:47   ` Phil Sainty
2022-10-12 10:25     ` Phil Sainty
2022-10-12 11:03       ` Lars Ingebrigtsen
2022-10-12 11:28         ` Phil Sainty [this message]
2022-10-12 11:33           ` Lars Ingebrigtsen
2022-10-13  8:01             ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=62e7deefa46f031798e6bf6ea927e7dc@webmail.orcon.net.nz \
    --to=psainty@orcon.net.nz \
    --cc=58302@debbugs.gnu.org \
    --cc=larsi@gnus.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).