Still working on this issue and it is still a problem, just to recap:
1. If we send a message with the "attachments" feature enabled, even with no attachment in the message, the Send process takes 15 - 20sec. When "Attachments" are disabled, the time is <2sec.
2. We have checked for queries, none are running during this period.
3. If we double the cpu and ram on the hosting server, the time is reduced by roughly 50%, but still not ideal (and very expensive). So the "attachments" process seems to be very resource intensive, even when there is no attachment.
I think our users wouldn't mind the wait if they were actually sending an attachment. Is it possible to have uddeIM check for attachments first before running whatever processes are consuming such high resources? That way messages with attachments would be slow, but normal ones would not.