Nilhcem/FakeSMTP — pull request #9 by essobedo (2014-05-05 15:09:14+00:00)
Title: Added the memory mode + improved the overall performances

Feel free to apply it or not, this set of fixes allowed me to use FakeSMTP for my performance tests, without them, it could not be used in my context. I guess that FakeSMTP has not been designed to be used for performance tests but I believe that it can still be interesting for your project, once again you are free to apply it or not.

1. I added a new mode that I called "Memory Mode", the main purpose of it was to disable the persistence of the messages which is not needed in my context and which has a huge impact in term of performance. Everything allowing to change the location of the messages is disabled when the "Memory Mode" is enabled.
2. I changed the default log level of "org.subethamail.smtp.server.Session" to INFO because the DEBUG mode is really verbose so it has a significant impact in term of CPU usage
3. System.getProperty("line.separator") is now put into a constant as it is slow and never change
4. In MailSaver.saveEmailAndNotify, I moved everything that could be moved outside the synchronized block to avoid locking too long the resource and being the main application bottleneck