Hi Noel, I do have a need for FIFO. I have been asking for such a feature for a long time. You can check the thread "FIFO spool manager" on the user mailing list (January 24, 2003).
I agree that the patch is ridiculous. I thought about making it configurable via something like: <config> <enforce-fifo>true</enforce-fifo> </config> The default value could be false, so that no CPU time is spent unless the user demands it. However, I found that the simplest the change would be, the greater its chances to get approved. I do have tested its correct behaviour. With 1 spool thread, it is perfectly FIFO. I have also performed stress tests with the modification and have experience no performance loss. My CPU intensive mailet application can handle a durable load of 11 e-mail per second with the FIFO file repository on dual Xeon 2.4GHz server. I was getting the same score without the FIFO modification. However, I must admit that the repositories are kept very small during my stress tests, so I can not offer any figures of the CPU cost of sorting a long list. Sun claims to have implemented the sorting algorithm in a n*log(n) manner. Regards, Diego -----Message d'origine----- De : Noel J. Bergman [mailto:[EMAIL PROTECTED] Envoyé : mardi 23 septembre 2003 20:40 À : [EMAIL PROTECTED] Cc : Diego Castillo Objet : RE: [PATCH] FIFO file repository Diego, I received the copy of the patch that you sent. Yes, you have to be subscribed to the mailing list, or your messages will require moderation. With respect to the patch, the only functional change is: + Collections.sort(clone); Have you been finding a problem? In the event of very large directories, I don't know that we should spend the CPU that way if we don't have a need. --- Noel -----Original Message----- From: Diego Castillo [mailto:[EMAIL PROTECTED] Sent: Monday, September 22, 2003 3:55 To: [EMAIL PROTECTED] Cc: Diego Castillo, INEXBEE Subject: [PATCH] FIFO file repository Hi all, Here goes a patch for enforcing FIFO ordering on file repositories. Hopefully it will make it into version 2.2.0. Regards, Diego --- AvalonMailRepository.java.orig Wed Aug 06 09:41:56 2003 +++ AvalonMailRepository.java Fri Sep 19 18:18:26 2003 @@ -431,12 +431,13 @@ * */ public Iterator list() { - // Fix ConcurrentModificationException by cloning + // Fix ConcurrentModificationException by cloning // the keyset before getting an iterator - final Collection clone; + final ArrayList clone; synchronized(keys) { clone = new ArrayList(keys); } + Collections.sort(clone); return clone.iterator(); } } --------------------------------------------------------------------- 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]