From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/74535 Path: news.gmane.org!not-for-mail From: Dan Christensen Newsgroups: gmane.emacs.gnus.general Subject: Re: Improving Gnus speed Date: Mon, 29 Nov 2010 15:17:03 -0500 Message-ID: <8762vf6g1s.fsf@uwo.ca> References: <87zktemkwl.fsf@uwo.ca> <87vd42mdci.fsf@uwo.ca> <87y68vhj3q.fsf@uwo.ca> <87sjz3h9zo.fsf@uwo.ca> <871v6el86z.fsf@uwo.ca> <87vd3h55w2.fsf@uwo.ca> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1291061870 31643 80.91.229.12 (29 Nov 2010 20:17:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 29 Nov 2010 20:17:50 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M22894@lists.math.uh.edu Mon Nov 29 21:17:47 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 1PNAAQ-0007N5-QP for ding-account@gmane.org; Mon, 29 Nov 2010 21:17:43 +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 1PNAA5-000203-FI; Mon, 29 Nov 2010 14:17:21 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PNAA4-0001zv-9z for ding@lists.math.uh.edu; Mon, 29 Nov 2010 14:17:20 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PNA9z-0002wc-RT for ding@lists.math.uh.edu; Mon, 29 Nov 2010 14:17:20 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PNA9z-0000P4-00 for ; Mon, 29 Nov 2010 21:17:15 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PNA9y-0007Et-LM for ding@gnus.org; Mon, 29 Nov 2010 21:17:14 +0100 Original-Received: from bas3-london14-1096779322.dsl.bell.ca ([65.95.134.58]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Nov 2010 21:17:14 +0100 Original-Received: from jdc by bas3-london14-1096779322.dsl.bell.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Nov 2010 21:17:14 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 31 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: bas3-london14-1096779322.dsl.bell.ca User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:pgbUNWFq8g1Tu6uTAa7vtothn/Y= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:74535 Archived-At: Lars Magne Ingebrigtsen writes: > Dan Christensen writes: > >> The upshot is that about 1.3s is date conversion for each article, the >> rest has to do with the latest-date traversal and the actual sorting. > > Ah, right. Thanks for benchmarking this. > > Perhaps the date parsing stuff should be pushed down into the C layer? > Surely one of the many libraries already included in a standard Emacs > build has a date parser already included... Could be. The lisp parser that we fall back onto in the worst case is very complicated, handling all sorts of weird date formats. But it seems to me that it should be possible to quickly parse the most common formats, and use slower code only when completely necessary. Could it be that 99% of current e-mail/news has only a small number of possible date formats? Another idea for some backends is to rewrite the Date: header as an X-Gnus-Date: header when the article arrives. We take the time to carefully parse it on arrival, storing the result, and then avoid re-doing the slow parsing every time we want to show the article. This could work for backends like nnfolder, nnml, etc, in which Gnus can easily edit the article. But this is probably not worth it. Better to just make date parsing lightning fast if possible. Dan