unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / 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 16:59:09 +0200	[thread overview]
Message-ID: <m2368vva6a.fsf@gmail.com> (raw)
In-Reply-To: <87r1wfsild.fsf@gnu.org> (Tassilo Horn's message of "Wed, 22 Apr 2020 16:25:34 +0200")

>>>>> On Wed, 22 Apr 2020 16:25:34 +0200, Tassilo Horn <tsdh@gnu.org> said:

    Tassilo> I have the same problem as Adam.  And it happened two or three times
    Tassilo> that upon clicking a message, Emacs started consuming 100% CPU and stuck
    Tassilo> at least 30 seconds before I hit C-g.  At one occurrence, I attached GDB
    Tassilo> after waiting at least 30 seconds for the full message to appear and on
    Tassilo> the bottom of the call stack was

    Tassilo>   dns-query
    Tassilo>   accept-process-output

    Tassilo> Hm, that must be that while loop in dns-query but given the values of
    Tassilo> step and times, I cannot see how that could block for so long.  And
    Tassilo> usually, it doesn't.

Iʼve seen it take 5 seconds with slow DNS just to do the DNS
lookup. There might be multiple issues here.

    Tassilo> And in the ususal case, it is just slow in the sense of maybe 2-5
    Tassilo> seconds.  And in those normal cases, it's not so much the dns query but
    Tassilo> the TLS negotiation with seccdn.libravatar.org (in case the DNS lookup
    Tassilo> found no custom gravatar url).

    Tassilo> Here's a profiler report gathered with:

    Tassilo> (progn
    Tassilo>   (profiler-start 'cpu)
    Tassilo>   (gravatar-retrieve-synchronously "tsdh@gnu.org")
    Tassilo>   (profiler-report)
    Tassilo>   (profiler-stop))

gravatar does those retrieves asynchronously, but that won't change
the call graph, I donʼt think.

Would it make sense to

1. Use dns-query-cached
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)
3. Apply the gravater caching patch from Philip K

I suspect [2] there would give the biggest improvement, given your
profile report.

Robert



  parent reply	other threads:[~2020-04-22 14:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-11 13:18 Rendering regression in Gnus with gnus-treat-from-gravatar Adam Sjøgren via "Emacs development discussions.
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 [this message]
2020-04-22 17:01           ` Tassilo Horn
2020-04-22 17:23             ` Robert Pluim

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=m2368vva6a.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.
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).