Skip to Content.
Sympa Menu

en - Re: [sympa-users] Adding a delivery type - html_summary - patches for 4.0b2

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Chris Hastie <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-users] Adding a delivery type - html_summary - patches for 4.0b2
  • Date: Tue, 10 Feb 2004 19:01:20 +0000

On Tue, 10 Feb 2004, Mark Valiukas <address@concealed> wrote
## Create the list of subscribers in html_summary mode
for (my $user = $self->get_first_user(); $user; $user =
$self->get_next_user()) {
push @tabrcpthtmlsummary, $user->{'email'}
if $user->{'reception'} eq "html_summary";
}

OK, I'm starting to do the bits I need to around here and wonder if any one can explain if there is a good reason why the code currently cycles through the entire (possibly very large) subscriber list twice, and with the above patch three times. Would not this, which only cycles through the list once, be rather more efficient:

## Create the list of subscribers in various digest modes
for (my $user = $self->get_first_user(); $user; $user =
$self->get_next_user()) {
push @tabrcpt, $user->{'email'}
if $user->{'reception'} eq "digest";
push @tabrcptsummary, $user->{'email'}
if $user->{'reception'} eq "summary";
push @tabrcpthtmlsummary, $user->{'email'}
if $user->{'reception'} eq "html_summary";
}

or is there some problem with this sort of thing that I've missed altogether?
--
Chris Hastie



Archive powered by MHonArc 2.6.19+.

Top of Page