davidmoten / subethasmtp

SubEtha SMTP is a Java library for receiving SMTP mail
Other
149 stars 40 forks source link

CPU consumption is unreasonably high #121

Open ogronome opened 11 months ago

ogronome commented 11 months ago

Hello, David!

Thanks for making good library almost great. Do you have any stats who and how is using it?

For me it is not behaving good when incoming flow is reaching 3 megabytes per second. That's strange - java webservers easily handle hundreds. I have a small app with subethasmtp simply writing InputStreams to FileInputStreams. No auth, no SSL, I just implemented MessageHandler and that's almost all.

I haven't used profilers before, so may be interpreting results incorrectly. Tried JFR and async-profiler. It seems like subethasmtp is spending too much time processing socket.... maybe there's something unefficient there?

I'll try to check it too...

smtp ap.txt

davidmoten commented 5 months ago

Does seem surprising. If you've got a repeatable test of this behaviour please submit it here, thanks.