From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/3808 Path: main.gmane.org!not-for-mail From: larsi@ifi.uio.no (Lars Magne Ingebrigtsen) Newsgroups: gmane.emacs.gnus.general Subject: Re: reading .overview files takes too long! Date: 02 Nov 1995 04:40:50 +0100 Organization: Dept. of Informatics, University of Oslo, Norway Sender: larsi@ifi.uio.no Message-ID: References: <199510260915.CAA15950@mir.cs.washington.edu> <199510261440.KAA27436@catfish.lcs.mit.edu> <199510261545.IAA04484@meitner.cs.washington.edu> <199510302142.WAA06042@ssv4.dina.kvl.dk> NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035144638 27359 80.91.224.250 (20 Oct 2002 20:10:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:10:38 +0000 (UTC) X-From-Line: ding-request@ifi.uio.no Wed Nov 1 20:58:45 1995 Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by miranova.com (8.6.11/8.6.9) with ESMTP id UAA05474 for ; Wed, 1 Nov 1995 20:58:39 -0800 Original-Received: from surt.ifi.uio.no (4867@surt.ifi.uio.no [129.240.76.2]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Thu, 2 Nov 1995 04:40:52 +0100 Original-Received: (from larsi@localhost) by surt.ifi.uio.no ; Thu, 2 Nov 1995 04:40:51 +0100 Original-To: ding@ifi.uio.no In-Reply-To: Per Abrahamsen's message of Mon, 30 Oct 1995 22:42:21 +0100 Original-Lines: 34 Xref: main.gmane.org gmane.emacs.gnus.general:3808 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:3808 Per Abrahamsen writes: > LMI> But `sort-by-date' is (and will always be) very slow, > > It does parse the date header O(N log N) times, and only need to do > that O(N) times, so it can be made much faster. That's true. That would require a slight total rewrite of the thread sorting functions, though. But the number of threads in a typical group usually is seldom over 100, which means that the time saved might be lost in the extra overhead... but probably not. Yikes! This is `gnus-sortable-date', which is called twice for each comparison (O(N log N)): (defun gnus-sortable-date (date) "Make sortable string by string-lessp from DATE. Timezone package is used." (let* ((date (timezone-fix-time date nil nil)) ;[Y M D H M S] (year (aref date 0)) (month (aref date 1)) (day (aref date 2))) (timezone-make-sortable-date year month day (timezone-make-time-string (aref date 3) (aref date 4) (aref date 5))))) I think I'll stick by my original statement -- `sort-by-date' will always be slow. :-) -- Home is where the cat is.