Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Lars Ingebrigtsen <larsi@corrigan.gnus.org>
To: Kevin Brubeck Unhammer <unhammer@fsfe.org>
Cc: info-gnus-english@gnu.org
Subject: Re: slow `B m' due to a require for each of gnus-active-hashtb
Date: Wed, 11 Apr 2018 20:16:23 +0200	[thread overview]
Message-ID: <87h8oh38y0.fsf@mouse.gnus.org> (raw)
In-Reply-To: <87oa52gubz.fsf@fsfe.org> (Kevin Brubeck Unhammer's message of "Tue, 09 Aug 2016 11:33:36 +0200")

Kevin Brubeck Unhammer <unhammer@fsfe.org> writes:

> On Gnus v5.13, Emacs 24.5.1, doing `B m` takes quite a long time (10s
> and up) before it shows any prompt (but seemingly only after I've been
> using Emacs for a while). If I toggle-debug-on-quit and poormansprofile
> it a bit, the backtraces always look like this:
>
> Debugger entered--Lisp error: (quit)
>   require(nntp)
>   gnus-get-function((nntp "news.gwene.org") request-accept-article t)
>   gnus-valid-move-group-p(nntp+news\.gwene\.org:gwene\.net\.patdavid\.gimp)

[...]

> It's a lot faster if I simply comment out (require (car method)) from
> gnus-get-function (the require seems to still be there in git). If
> that's not safe (how many backend methods are there?), then perhaps
> there could be an alternate active group storage that organises active
> groups hierarchically, so it would be possible to go from
> valid-move-group to a set of groups?

Hm...  it's odd that require should be the bottleneck here, because it's
a NOOP if the feature has already been loaded.

(benchmark-run 100000 (require 'nntp))

takes 0.1s on my machine.  How many groups do you have?  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no


      parent reply	other threads:[~2018-04-11 18:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09  9:33 Kevin Brubeck Unhammer
2016-08-10 16:43 ` P. Paolini
2018-04-11 18:16 ` Lars Ingebrigtsen [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=87h8oh38y0.fsf@mouse.gnus.org \
    --to=larsi@corrigan.gnus.org \
    --cc=info-gnus-english@gnu.org \
    --cc=unhammer@fsfe.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).