You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Jerry Crone <Je...@weblinkwireless.com> on 2002/07/30 18:26:03 UTC

Processing messages from spool

I have been looking at the code that takes messages from the spool and
processes them.
Assume that I am running a production server with more than 300k
messages per day, and that there are 2,000 messages on the spool. It
seems that AvalonMailRepository.list() is called for every message that
is processed, creating a new HashSet. This would mean:
1) a lot of objects are created and GCed soon thereafter
2) if the spool always has messages, how could you be optimistic that
the last message in the HashSet would be processed?

What is the problem of using a queue for the keys; e.g., a single
instance of Vector? The keys for messages being processed would have
been removed from the Vector; however, their corresponding members would
still be in the ObjectRepository and StreamRepository until their
processing is done. If James is shutdown and restarted, the keys would
be included in the new queue.

I want to emphasize that I am not being critical; I am ignorant of the
discussions that occurred while James was being designed. You all have
done a lot of excellent work.

P.S. I incorporated Shilpa's new classes and code mods. It increased
throughput by more than 30% (using files for both spool and inboxes).

Have a good day, Jerry Crone