fabpot/Silex — pull request #396 by spantaleev (2012-06-25 13:29:34+00:00)
Title: Avoid Swift Mailer initialization if possible

The finish() filter flushing spool messages after each request
caused Swift Mailer to be initialized and all services in this
provider to be instantiated.

Doing all this work takes time and is potentially unnecessary,
since only a small number of all requests queue messages for sending.

The time it takes to initialize swiftmailer and all services is between
1 and 2ms on the 2 machines I tested on.
This seems like a big price to pay for just including a provider
that does nothing for most requests.