Re: [siesta-dev] Send patch for discussion

[prev] [thread] [next] [lurker] [Date index for 2004/04/05]

From: Nicholas Clark
Subject: Re: [siesta-dev] Send patch for discussion
Date: 20:19 on 05 Apr 2004
On Mon, Apr 05, 2004 at 06:09:02PM +0100, Richard Clamp wrote:

> +        my $md5 = md5_hex( $message->as_string );
> +        $messages{ $md5 } ||= {
> +            message    => $message,
> +            to         => [],
> +           };
> +        push @{ $messages{ $md5 }{to} }, $user->email;
> +    };
> +    for my $batch (values %messages) {
> +        Siesta->sender->send( $batch->{message},
> +                              to   => $batch->{to},
>                                from => $list->return_path,
> -                            );
> +                             );
>      }
>      return;
>  }

> 2) There's a potential to ballon up and eat all the RAM, if enough
> users have customised their mail just for them.  This is a bad thing,
> right?

You could use the message itself as the hash key. It won't use any more
RAM (in fact it will use slightly less, because you don't need to store it
as a value in the hash) and I think it will be about as efficient.

Nicholas Clark

Generated at 13:56 on 01 Jul 2004 by mariachi 0.52