Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU usage & geometrically increasing delay with increasing length of the recipient address #16

Closed
jusiponen opened this issue May 5, 2015 · 5 comments

Comments

@jusiponen
Copy link

Measured with simple-java-mail-v2.1 and javax.mail-1.5.1

05-05-2015 16:53:48: Sending email: rekry@fi.xyz.dom -> iitakeskus-kauppakeskus-rav.paallikko@fi.xyz.dom (3 attachments)
05-05-2015 16:53:48: These attachments were sent:
05-05-2015 16:53:48: Attachment 1 / 3 filename '108782_-_Sally-Ellen_Example.pdf', content type 'application/pdf'
05-05-2015 16:53:48: Attachment 2 / 3 filename '108782_Sally-Ellen_Example_108782_-_Ansioluetteloni.pdf', content type 'application/pdf'
05-05-2015 16:53:48: Attachment 3 / 3 filename '108782_Sally-Ellen_Example_108782_-_Hakemuskirje.pdf', content type 'application/pdf'
05-05-2015 16:55:57: DEBUG Mailer - starting mail session (host: null, port: null, username: null, authenticate: null, transport: SMTP_PLAIN)

05-05-2015 16:57:31: Sending email: rekry@fi.xyz.dom -> i-itakeskus-kauppakeskus-rav.paallikko@fi.xyz.dom (3 attachments)
05-05-2015 16:57:31: These attachments were sent:
05-05-2015 16:57:31: Attachment 1 / 3 filename '108782_-_Sally-Ellen_Example.pdf', content type 'application/pdf'
05-05-2015 16:57:31: Attachment 2 / 3 filename '108782_Sally-Ellen_Example_108782_-_Ansioluetteloni.pdf', content type 'application/pdf'
05-05-2015 16:57:31: Attachment 3 / 3 filename '108782_Sally-Ellen_Example_108782_-_Hakemuskirje.pdf', content type 'application/pdf'
05-05-2015 17:01:20: DEBUG Mailer - starting mail session (host: null, port: null, username: null, authenticate: null, transport: SMTP_PLAIN)

05-05-2015 17:16:47: Sending email: rekry@fi.xyz.dom -> ki-itakeskus-kauppakeskus-rav.paallikko@fi.xyz.dom (3 attachments)
05-05-2015 17:16:47: These attachments were sent:
05-05-2015 17:16:47: Attachment 1 / 3 filename '108782_-_Sally-Ellen_Example.pdf', content type 'application/pdf'
05-05-2015 17:16:47: Attachment 2 / 3 filename '108782_Sally-Ellen_Example_108782_-_Ansioluetteloni.pdf', content type 'application/pdf'
05-05-2015 17:16:47: Attachment 3 / 3 filename '108782_Sally-Ellen_Example_108782_-_Hakemuskirje.pdf', content type 'application/pdf'
05-05-2015 17:25:24: DEBUG Mailer - starting mail session (host: null, port: null, username: null, authenticate: null, transport: SMTP_PLAIN)

Summary

Email address Addr. Length Start (hh:mm:ss) Finish (hh:mm:ss) Time taken Delta
iitakeskus-kauppakeskus-rav.paallikko@fi.xyz.dom 48 16:53:48 16:55:57 0:02:09 n/a
i-itakeskus-kauppakeskus-rav.paallikko@fi.xyz.dom 49 16:57:31 17:01:20 0:03:49 0:01:40
ki-itakeskus-kauppakeskus-rav.paallikko@fi.xyz.dom 50 17:16:47 17:25:24 0:08:37 0:04:48
hki-itakeskus-kauppakeskus-rav.paallikko@fi.xyz.dom 51 DID NOT MEASURE -- This is the address that brought this problem to attention

I haven't verified with plain Java Mail if the problem persists.

@bbottema
Copy link
Owner

bbottema commented May 5, 2015

I think these might be regex related when validating the email addresses. In the next release (not scheduled yet), by default regex email address validation will be turned off.

@jusiponen
Copy link
Author

Regexes sounds plausible, given the CPU/time double-whammy.

Any way to turn those checks off at runtime (let's assume we have validated all addresses previously)?

@bbottema
Copy link
Owner

bbottema commented May 5, 2015

Not yet. In the next release it will be turned off by default with the option to turn it on. Currently no workaround.

@jusiponen
Copy link
Author

Ok, I'll take the sources and compile a private version for now.

Thanks!

@bbottema
Copy link
Owner

bbottema commented May 9, 2015

@jusiponen, I just released simple-java-mail 2.2 to maven central. Can you please have a go with it and see if the issue still persists?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants