emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rendering regression in Gnus with gnus-treat-from-gravatar


From: Robert Pluim
Subject: Re: Rendering regression in Gnus with gnus-treat-from-gravatar
Date: Wed, 22 Apr 2020 19:23:39 +0200

>>>>> On Wed, 22 Apr 2020 19:01:42 +0200, Tassilo Horn <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]