From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/74009 Path: news.gmane.org!not-for-mail From: Francis Moreau Newsgroups: gmane.emacs.gnus.general Subject: Re: Improving Gnus speed Date: Wed, 10 Nov 2010 15:16:06 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1289402923 30621 80.91.229.12 (10 Nov 2010 15:28:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 10 Nov 2010 15:28:43 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M22377@lists.math.uh.edu Wed Nov 10 16:28:39 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PGCbG-0007JZ-SP for ding-account@gmane.org; Wed, 10 Nov 2010 16:28:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PGCaR-0006il-Ht; Wed, 10 Nov 2010 09:27:47 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PGBTt-00065H-25 for ding@lists.math.uh.edu; Wed, 10 Nov 2010 08:16:57 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PGBTf-00084m-G2 for ding@lists.math.uh.edu; Wed, 10 Nov 2010 08:16:56 -0600 Original-Received: from mail-ww0-f48.google.com ([74.125.82.48]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PGBTe-0001mg-00 for ; Wed, 10 Nov 2010 15:16:42 +0100 Original-Received: by wwb17 with SMTP id 17so758631wwb.5 for ; Wed, 10 Nov 2010 06:16:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=F7C6DJbMJ28A4pKGprbRd2+RUO/1UuiJATyALMHWLrE=; b=PmJV59rqSYcpZ5JbW81SETmJ3PV/tUx6KsIR5SjkwipSXE7zho78smQ48saT4QoyKu 0eeLErUed9GhwrB/U11KkbJTatf60MtazDKaK98jB0i9rn47352kMApZVgMj1xK80Pce EYpEwqM1fcvGZH2IcaCmDUTRVclnYZ81GuGC4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; b=vfOlN4/cE7hVSEcM1mb7tafYVfGRDZwzaQygG97oP8gRmw3l+YF1h/KDYYUliC14g7 3kUmMq3JTOSnktiklLlyaA97Ae6InICbmy77bY0R/fTHlxAmH2/mh+sbBkDoJJqiatw9 qJqBNae+jf3Q7TQ8Q/pB6k4frY0enZiduSacQ= Original-Received: by 10.216.142.199 with SMTP id i49mr7648242wej.96.1289398571647; Wed, 10 Nov 2010 06:16:11 -0800 (PST) Original-Received: from localhost (au213-1-82-235-205-153.fbx.proxad.net [82.235.205.153]) by mx.google.com with ESMTPS id x23sm467056weq.10.2010.11.10.06.16.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 10 Nov 2010 06:16:10 -0800 (PST) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Tue, 09 Nov 2010 19:55:23 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Spam-Score: -2.0 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:74009 Archived-At: Lars Magne Ingebrigtsen writes: > Francis Moreau writes: > >> Even if articles are cached, Gnus takes some times to display the >> summary buffer: >> >> Entering in the group containing cached articles: 4 secs. >> >> This group contains 230 unread articles. > > That's obscenely slow. Even if the 230 articles were fetched over the > net, it shouldn't take anywhere that long. > >> Now display all articles in this group by doing '/ o': >> >> Gnus asks me: >> >> How many articles from nnml+cache:nntp+news.free.fr:comp.lang.c (default 42555): >> >> Type . >> >> Fetching headers for nnml+cache:nntp+news.free.fr:comp.lang.c... >> < 7 secs> >> done >> < 22 secs> >> Generating summary... >> < 3 secs> >> done > > That seems rather slow, too, but Gnus is rather slow when rendering > large summary buffers, and I've never understood why, really. Entering > a 10K group takes a couple of seconds, but entering a 100K group takes > several minutes. So there's something exponential going on somewhere... > >> I'm interested in improving this, so any suggestions are welcome. > > (setq debug-on-quit t) and then `C-g'-ing a few times should tell you > what function is taking so long. Here's my first experiments: While in the fetching headers... process I got the following backtrace: string-match("\\(<[^<]+>\\)[ ]*\\'" "... gnus-get-newsgroup-headers-xover gnus-fetch-headers gnus-summary-insert-articles gnus-summary-insert-old-articles and while in the 22 secs processing, hitting C-g gives: parse-time-tokenize parse-time-string mail-header-parse-date gnus-thread-latest-date gnus-thread-sort-by-most-recent-date gnus-sort-threads-recursive . 33 calls to gnus-sort-threads-recursive . gnus-sort-threads gnus-summary-prepare gnus-summary-limit gnus-summary-insert-old-articles > `M-x elp-instrument-package RET gnus RET', doing something, and then > `M-x elp-results' should give you a detailed look. This fails with the following message: "Variable binding depth exceeds max-specpdl-size" However doing 'M-x elp-results' still shows me: gnus-sort-threads-recursive 641 65.774695999 0.1026126302 gnus-thread-sort-by-most-recent-date 4348 31.652889000 0.0072798732 gnus-thread-latest-date 8696 31.436723000 0.0036150785 gnus-thread-total-score 82494 17.555852999 0.0002128136 gnus-thread-total-score-1 82494 17.134565999 0.0002077068 gnus-summary-insert-articles 1 8.04944 8.04944 gnus-fetch-headers 1 8.019706 8.019706 gnus-get-newsgroup-headers-xover 1 8.005099 8.005099 gnus-thread-sort-by-total-score 8697 3.4791829999 0.0004000440 gnus-id-to-thread 82494 1.3472719999 1.633...e-05 gnus-float-time 41229 0.2444190000 5.928...e-06 gnus-retrieve-headers 2 0.0244269999 0.0122134999 gnus-make-threads 1 0.023105 0.023105 gnus-sorted-nunion 1 0.015179 0.015179 gnus-cache-retrieve-headers 1 0.012292 0.012292 [...] -- Francis