From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/10850 Path: main.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.gnus.general Subject: Re: timezone.el patterns in emacs 19.34 Date: 02 May 1997 23:07:34 -0400 Sender: raeburn@cygnus.com Message-ID: References: <199705020844.EAA06520@kr-laptop.cygnus.com> NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035150653 26767 80.91.224.250 (20 Oct 2002 21:50:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:50:53 +0000 (UTC) Return-Path: Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.8.5/8.8.5) with SMTP id UAA13597 for ; Fri, 2 May 1997 20:17:00 -0700 Original-Received: from cygnus.com (cygnus.com [205.180.230.20]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Sat, 3 May 1997 05:07:38 +0200 Original-Received: from tweedledumb.cygnus.com (tweedledumb.cygnus.com [192.80.44.1]) by cygnus.com (8.8.5/8.8.5) with SMTP id UAA12588 for ; Fri, 2 May 1997 20:07:36 -0700 (PDT) Original-Received: from kr-laptop.cygnus.com by tweedledumb.cygnus.com (4.1/4.7) id AA03458; Fri, 2 May 97 23:07:34 EDT Original-Received: (from raeburn@localhost) by kr-laptop.cygnus.com (8.8.5/8.8.4) id XAA00815; Fri, 2 May 1997 23:07:34 -0400 Original-To: ding@ifi.uio.no In-Reply-To: Hrvoje Niksic's message of 03 May 1997 03:14:47 +0200 Original-Lines: 34 X-Mailer: Gnus v5.4.37/Emacs 19.34 Xref: main.gmane.org gmane.emacs.gnus.general:10850 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:10850 Hrvoje Niksic writes: > > I noticed some time ago that timezone-parse-date took up a large > > portion of the time of building a summary buffer in Gnus. > How large a portion? 20%, 50%? Looking at timezone.el, it looks like I don't remember for sure; the timing I did was some time ago. In my recent checks (mostly to verify the names of the routines before I started looking at them) I interrupted the "generating summary" phase, with debug-on-quit set, and that's where it usually wound up according to the backtrace. > it should be written in C. It's not that hard to write, and the > speedup would measure by hundreds (all those regexps would become > unnecessary). I'm not so sure about converting it to straight C; I could imagine wanting to change the supported format list someday, and wanting to do so easily -- i.e., without recompiling emacs. (In fact, the ISO format Francois Pinard just recommended using may require changes to get the time zone right.) Besides, I think you'd probably wind up doing the regexp bit anyways, just at the C level. These patterns don't have to match the *entire* string, just some substring. And if you do one regexp match, well, that doesn't seem much better than what you'd do in what appears to be the common case under Gnus, if you use the reordering I suggested. Now, if we can ignore or work around that substring issue (not a trivial issue, Gnus isn't the only user of that code), and require a match against the whole string, then using getdate.y might be a win. I understand it's supposed to be pretty comprehensive. Ken