From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/69282 Path: news.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.gnus.general Subject: Re: faster gnus-thread-latest-date Date: Sun, 13 Dec 2009 21:29:52 +1100 Message-ID: <87ljh72mlb.fsf@rimspace.net> References: <87my1uiien.fsf@uwo.ca> <87hbs2yw7f.fsf@uwo.ca> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1260700615 12839 80.91.229.12 (13 Dec 2009 10:36:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Dec 2009 10:36:55 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M17687@lists.math.uh.edu Sun Dec 13 11:36:48 2009 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.50) id 1NJlol-00042S-5F for ding-account@gmane.org; Sun, 13 Dec 2009 11:36:47 +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 1NJlnL-0006nV-Iw; Sun, 13 Dec 2009 04:35:19 -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 1NJlnH-0006n0-SY for ding@lists.math.uh.edu; Sun, 13 Dec 2009 04:35:15 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1NJlnF-000788-DU for ding@lists.math.uh.edu; Sun, 13 Dec 2009 04:35:15 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1NJlnE-0004ax-00 for ; Sun, 13 Dec 2009 11:35:12 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NJlnE-0003YO-4T for ding@gnus.org; Sun, 13 Dec 2009 11:35:12 +0100 Original-Received: from ppp59-167-189-244.static.internode.on.net ([59.167.189.244]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Dec 2009 11:35:12 +0100 Original-Received: from daniel by ppp59-167-189-244.static.internode.on.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Dec 2009 11:35:12 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ppp59-167-189-244.static.internode.on.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:hHQx26PJlnNjZnOneFr28BKPTCg= X-Spam-Score: -3.2 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:69282 Archived-At: Dan Christensen writes: > Dan Christensen writes: > >> In my tests, it is noticeable faster. Can it be improved further? > > Actually, in my tests it is only slightly faster. Still, the code is much > simpler, so unless someone can think of a reason not to, I think the change > should be made (after someone else checks it over and tests it). Replacing reasonably sensible behaviour (use delivery time if no accurate time is available) with nonsense (delivered before everything else if no accurate time is available) doesn't look like a usability win to me. :( I guess that either was this isn't this going to be hit very often at all, is it, these days? After all, threads with no sane time information are rare, so the fallback isn't hit much either way. > However, I think there's an orthogonal change which could greatly improve > the sorting speed. For a group I have with about 6000 messages and maybe > 1000 threads (?), gnus-thread-latest-date is called 31028 times, taking > about 10.5 seconds in total. If the output from gnus-thread-latest-date was > cached, that would reduce the number of computations of this date by at > least a factor of 5, and so would greatly reduce the time needed to enter > the summary buffer. This sounds like a vastly more useful way to fix the problem; the results below show that memoizing the function returns better performance improvements. Daniel -- ✣ Daniel Pittman ✉ daniel@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons