From: Dan Christensen <jdc@uwo.ca>
To: ding@gnus.org
Subject: Re: faster gnus-thread-latest-date
Date: Wed, 09 Dec 2009 22:03:09 -0500 [thread overview]
Message-ID: <87y6lbfs42.fsf@uwo.ca> (raw)
In-Reply-To: <873a3lj89l.fsf@uwo.ca>
I'm now thinking that caching the parsed time in "time value" format (a
pair of integers) rather than a float might be more useful, since many
parts of Gnus need this information. For example, gnus-dd-mmm and
gnus-user-date take the date in this format to produce the summary
lines. If the user is using dates for sorting and in summary lines,
then the slow part (parse-time-string) will only need to be done once.
But in looking around the code, I noticed the following discrepancies:
In gnus-thread-latest-date, the time value is computed using
(mail-header-parse-date (mail-header-date header))
and mail-header-parse-date is an alias for ietf-drums-parse-date, which
is defined to be (apply 'encode-time (parse-time-string string)).
On the other hand, *every* other part of Gnus that needs to convert
a date string to a time value uses date-to-time, which is defined
to be
(apply 'encode-time (parse-time-string
(timezone-make-date-arpa-standard date)))
The comments near the last one suggest that this makes conversion
more robust. However, it is 3 times slower than the first way.
Since everywhere else in Gnus uses the slower way, and we're going to
cache the output anyways, I guess the right thing to do is to switch
gnus-thread-latest-date to use date-to-time as well.
Once this is done, is there any reason to keep ietf-drums-parse-date
around? It's not used anywhere else in the code that I can see.
Dan
next prev parent reply other threads:[~2009-12-10 3:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 21:27 Dan Christensen
2009-12-08 3:35 ` Dan Christensen
2009-12-08 7:07 ` Katsumi Yamaoka
2009-12-08 19:14 ` Ted Zlatanov
2009-12-09 0:33 ` Dan Christensen
2009-12-10 3:03 ` Dan Christensen [this message]
2009-12-11 3:01 ` Dan Christensen
2009-12-11 22:03 ` Dan Christensen
2009-12-13 23:25 ` Dan Christensen
2009-12-14 16:18 ` Dave Love
2009-12-13 23:56 ` Dan Christensen
2010-01-02 2:09 ` Dan Christensen
2010-01-12 17:17 ` Reiner Steib
2010-06-09 13:42 ` Dan Christensen
2010-06-10 0:32 ` Katsumi Yamaoka
2010-06-10 8:42 ` Gnus new commits (was: faster gnus-thread-latest-date) Ted Zlatanov
2009-12-13 10:29 ` faster gnus-thread-latest-date Daniel Pittman
2009-12-13 23:38 ` Dan Christensen
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=87y6lbfs42.fsf@uwo.ca \
--to=jdc@uwo.ca \
--cc=ding@gnus.org \
/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).