Using the smtp.module together with the locale.module with more than one language enabled, causes a major loss of performance. I've discovered that using the t()-function when initializing the $PHPMAILER_LANG array is causing the problems, because t() is used in the global space (ie. when the module is loaded) and before the user object has been initialized. This causes all cached language strings to be repeatedly trashed and forced to be reloaded one by one.
The supplied patch resolves this issue by moving the $PHPMAILER_LANG array (and its translation) back into phpmailer's setLanguage() method, where it was used (was this ever working, btw? as $PHPMAILER_LANG hasn't been accessed via $GLOBALS[]...).
| Comment | File | Size | Author |
|---|---|---|---|
| smtp.module.patch | 2.63 KB | smk-ka |
Comments
Comment #1
Visigotik commentedworks great
Comment #2
LukeLast commentedLooks like a good idea, I'll commit asap.
Comment #3
(not verified) commented