Gnus development mailing list
 help / color / mirror / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: "Adam Sjøgren" <asjo@koldfront.dk>
Cc: ding@gnus.org,  emacs-devel@gnu.org
Subject: Re: Rendering regression in Gnus with gnus-treat-from-gravatar
Date: Wed, 22 Apr 2020 19:23:39 +0200	[thread overview]
Message-ID: <m2zhb3e8o4.fsf@gmail.com> (raw)
In-Reply-To: <87imhrsbd5.fsf@gnu.org> (Tassilo Horn's message of "Wed, 22 Apr 2020 19:01:42 +0200")

>>>>> On Wed, 22 Apr 2020 19:01:42 +0200, Tassilo Horn <tsdh@gnu.org> said:

    >> Would it make sense to
    >> 
    >> 1. Use dns-query-cached

    Tassilo> I guess so as it does the lookups on every message and every mail
    Tassilo> address where it would suffice to do it once per unique domain part of
    Tassilo> mail addresses.

Right. And dns-query-cached remembers 'nil' returns from the DNS
lookup as well. I guess I should push that change soon.

diff --git a/lisp/image/gravatar.el b/lisp/image/gravatar.el
index ff59a72ac8..8a73959996 100644
--- a/lisp/image/gravatar.el
+++ b/lisp/image/gravatar.el
@@ -149,7 +149,7 @@ gravatar--service-libravatar
           (dolist (record '(("_avatars-sec" . "https")
                             ("_avatars" . "http")))
             (let* ((query (concat (car record) "._tcp." domain))
-                   (result (dns-query query 'SRV)))
+                   (result (dns-query-cached query 'SRV)))
               (when result
                 (throw 'found (format "%s://%s/avatar"
                                       (cdr record)

    >> 2. Switch gravatar to use http rather than https by default, with a
    >> user option to use https (Iʼm assuming this speeds things up)

    Tassilo> Indeed, I've tried using "http://cdn.libravatar.org/avatar" which was
    Tassilo> way faster.  Do you know what might slow down TLS negotiation so much?
    Tassilo> Now when I think about it, I'd also say that accessing GNU ELPA for
    Tassilo> package upgrades became slower, too.  But browsing the web seems to work
    Tassilo> normally but I think Firefox or Epiphany might not use gnutls...

Nothing has changed in that area recently, although Bug#40665 has
uncovered some interesting corner cases that weʼre working
on. Covid-19 effect maybe.

    >> 3. Apply the gravater caching patch from Philip K
    >> 
    >> I suspect [2] there would give the biggest improvement, given your
    >> profile report.

    Tassilo> Maybe.  But if I understood your reply to Adam on ding, only the DNS
    Tassilo> lookups block seeing the complete Gnus article, right?  The retrieval is
    Tassilo> asynchronous anyway which just means the gravatar images might take some
    Tassilo> time to pop up in the article buffer.  If that is true, then I'd only
    Tassilo> care about the DNS part.

Yes, the retrieval is asynchronous, DNS isn't. Iʼve made some attempts
to get the DNS lookups be done in a separate thread, but they've not
been very successful. And now that I look closely, url-retrieve does
caching as well, so hopefully with extended use the slowdowns will go
away.

Robert


      reply	other threads:[~2020-04-22 17:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <877dym5fes.fsf@tullinup.koldfront.dk>
2020-04-11 14:15 ` Robert Pluim
2020-04-11 15:16   ` Adam Sjøgren
2020-04-11 16:53     ` Robert Pluim
2020-04-14 13:14       ` Robert Pluim
2020-04-14 15:46         ` Eli Zaretskii
2020-04-14 17:32         ` Adam Sjøgren
2020-04-15  8:15           ` Robert Pluim
2020-04-15  9:41             ` Eli Zaretskii
2020-04-15 10:13               ` Robert Pluim
2020-04-15 11:38                 ` Eli Zaretskii
2020-04-15 11:55                   ` Robert Pluim
2020-04-15 12:01                     ` Eli Zaretskii
2020-04-15 13:54                       ` Robert Pluim
2020-04-15 14:12                         ` Eli Zaretskii
2020-04-15 14:20                           ` Robert Pluim
2020-04-22 14:25       ` Tassilo Horn
2020-04-22 14:39         ` Tassilo Horn
2020-04-22 14:56           ` Robert Pluim
2020-04-22 17:32             ` Tassilo Horn
2020-04-22 14:59         ` Robert Pluim
2020-04-22 17:01           ` Tassilo Horn
2020-04-22 17:23             ` Robert Pluim [this message]

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

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

  git send-email \
    --in-reply-to=m2zhb3e8o4.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=asjo@koldfront.dk \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.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.
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 NNTP newsgroup(s).