summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7e782e8)
PublicInbox::Smsg::date remains the only exception which
requires any subroutine calls, here, so we'll just have
a branch just for that.
my $msgs = $over->query_xover($$beg, $end);
scalar(@$msgs) or return;
my $tmp = '';
my $msgs = $over->query_xover($$beg, $end);
scalar(@$msgs) or return;
my $tmp = '';
- foreach my $s (@$msgs) {
- $tmp .= $s->{num} . ' ' . $s->$field . "\r\n";
+
+ # ->{$field} is faster than ->$field invocations, so favor that.
+ if ($field eq 'date') {
+ for my $s (@$msgs) {
+ $tmp .= "$s->{num} ".PublicInbox::Smsg::date($s)."\r\n"
+ }
+ } else {
+ for my $s (@$msgs) {
+ $tmp .= "$s->{num} $s->{$field}\r\n";
+ }
}
utf8::encode($tmp);
$self->msg_more($tmp);
}
utf8::encode($tmp);
$self->msg_more($tmp);