xhit / go-simple-mail

Golang package for send email. Support keep alive connection, TLS and SSL. Easy for bulk SMTP.
MIT License
650 stars 102 forks source link

Do not use replaceCID if not necessary #106

Closed meain closed 6 months ago

meain commented 6 months ago

This PR makes two main changes:

Follow up to https://github.com/xhit/go-simple-mail/pull/103

I was trying to speed up the .eml generation and found replaceCID to be a huge bottle neck. Here is a flamegraph of the cpu/execution time. You can see that a major chunk is taken up by replaceCID regexp search. 2024-04-03-17-17-23