Gnus development mailing list
 help / color / mirror / Atom feed
From: Ken Raeburn <raeburn@cygnus.com>
Subject: Re: timezone.el patterns in emacs 19.34
Date: 02 May 1997 23:07:34 -0400	[thread overview]
Message-ID: <tx1911xl0cp.fsf@cygnus.com> (raw)
In-Reply-To: Hrvoje Niksic's message of 03 May 1997 03:14:47 +0200

Hrvoje Niksic <hniksic@srce.hr> 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


  reply	other threads:[~1997-05-03  3:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <199705020844.EAA06520@kr-laptop.cygnus.com>
1997-05-03  1:14 ` Hrvoje Niksic
1997-05-03  3:07   ` Ken Raeburn [this message]
1997-05-03  4:04     ` Hrvoje Niksic
1997-05-03 23:44       ` Ken Raeburn
1997-05-04  0:41         ` Hrvoje Niksic
1997-05-04  3:03           ` Ken Raeburn
1997-05-04 19:55             ` Hrvoje Niksic
1997-05-04 20:49               ` Johan Danielsson
1997-05-04 20:55                 ` Hrvoje Niksic
1997-05-04 22:22                   ` Public domain (was: timezone.el patterns in emacs 19.34) Johan Danielsson
1997-05-05  6:52                     ` Lars Magne Ingebrigtsen
1997-05-04 22:55                   ` timezone.el patterns in emacs 19.34 Stainless Steel Rat
1997-05-08 12:37         ` Lars Magne Ingebrigtsen
1997-05-03 22:41   ` Ken Raeburn
1997-05-02 23:18 Ken Raeburn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tx1911xl0cp.fsf@cygnus.com \
    --to=raeburn@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).