I have done it.I find out that MailImp uses a ArraList as recipients container.so I
think no need to use a Vector.
I also do the following:
// old
//Collection notRecipients = new Vector();
//notRecipients.addAll(mail.getRecipients());
//notRecipients.removeAll(recipients);
// new
Collection notRecipients = null;
if( recipients.size() == mail.getRecipients().size())
notRecipients = new ArrayList();
else {
notRecipients = new ArrayList(mail.getRecipients());
Collections.copy((List)notRecipients,(List)mail.getRecipients());
notRecipients.removeAll(recipients);
}
This makes the LinearProcessor works faster now. perhaps there are better methods?
>The ArrayList implementation was designed to improve the performance of
>Vector. Then, it could be a good idea to change that Vector if you are
>having troubles with performance.
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Sent: Jueves, 09 de Septiembre de 2004 02:38 a.m.
>To: James Users List
>Subject: Can i replace a Vector with a ArrayList
>
>
>Line 371 in org.apache.james.transport.LinearProcessor :
>recipients = new Vector();
>this could be repalced with
>recipients = new ArrayList();
>am I right?
>I want do this because when My email's recipients reachs 20,000 or more ,the
>spoolmanager become very slow,and I want do something to make it fast.
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]