From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/42175 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.gnus.general Subject: Re: Benchmarking Gnus Date: Sat, 19 Jan 2002 00:42:26 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035177452 9970 80.91.224.250 (21 Oct 2002 05:17:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 05:17:32 +0000 (UTC) Return-Path: Original-Received: (qmail 3615 invoked from network); 18 Jan 2002 23:50:54 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 18 Jan 2002 23:50:54 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16RimO-0000JI-00; Fri, 18 Jan 2002 17:50:40 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 18 Jan 2002 17:50:33 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id RAA14121 for ; Fri, 18 Jan 2002 17:50:23 -0600 (CST) Original-Received: (qmail 3609 invoked by alias); 18 Jan 2002 23:50:24 -0000 Original-Received: (qmail 3604 invoked from network); 18 Jan 2002 23:50:24 -0000 Original-Received: from fepe.post.tele.dk (195.41.46.137) by gnus.org with SMTP; 18 Jan 2002 23:50:24 -0000 Original-Received: from defun.localdomain ([195.215.96.186]) by fepE.post.tele.dk (InterMail vM.4.01.03.23 201-229-121-123-20010418) with ESMTP id <20020118235021.KXXU25405.fepE.post.tele.dk@defun.localdomain> for ; Sat, 19 Jan 2002 00:50:21 +0100 Original-To: ding@gnus.org X-Face: &>4YWj)5jy97[$J|&W(MX>,:L.9*|o]WXwhY40_'#-Yc:J-&v+U*?uhK9cqS'eaG(SLj0o E)IS]Ua_g,_"S$Xv)V5^T<^s?U8Tt6XZ~2EdDl^]={px>)aE[grl6~~G`7:vKu!:tZ_.L6,g7qV[; vn><9`4hh(Pf^gH'EJ[!c/$Jog51Q In-Reply-To: (larsi@gnus.org's message of "Wed, 16 Jan 2002 02:14:07 +0000 (UTC)") Original-Lines: 21 User-Agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.1 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:42175 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:42175 --=-=-= larsi@gnus.org (Lars Magne Ingebrigtsen) writes: > There are now three things that take about the same time when entering > a group, and account for 95% of the time spent: > > 1) parsing NOV headers (this has gotten slower due to MIME stuff, I'm > guessing) > 2) scoring > 3) creating and outputting the threads > > If someone wants to look closer at this, then I'm all for it. :-) Here's a small tweak, which speeds up threading a bit (around 5-10%): `gnus-parent-id' is usually called without the optional argument -- in that case we only want the last msg.id in References, so we don't really need to call `gnus-split-references' to parse *all* the references and build a list of them. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=gnus-util.el.diff --- ../../gnus/lisp/gnus-util.el Wed Jan 16 05:14:26 2002 +++ gnus-util.el Fri Jan 18 22:58:21 2002 @@ -479,10 +479,13 @@ If N, return the Nth ancestor instead." (when (and references (not (zerop (length references)))) - (let ((ids (inline (gnus-split-references references)))) - (while (nthcdr (or n 1) ids) - (setq ids (cdr ids))) - (car ids)))) + (if n + (let ((ids (inline (gnus-split-references references)))) + (while (nthcdr n ids) + (setq ids (cdr ids))) + (car ids)) + (when (string-match "<[^> \t]+>\\'" references) + (match-string 0 references))))) (defun gnus-buffer-live-p (buffer) "Say whether BUFFER is alive or not." --=-=-=--