Mass mail rendering up to 26× faster
HTML normalization now runs once per email instead of once per recipient. For 500 recipients it drops from 289 ms to 11 ms.
HTML normalization now runs once per email instead of once per recipient. For 500 recipients it drops from 289 ms to 11 ms.
| Branch | Pull request | Commit |
|---|---|---|
| 18.0 | odoo/odoo#291756 ↗ | 60b7af67e4 ↗ |
| 19.0 | odoo/odoo#292921 ↗ | 3008dda3b0 ↗ |
| 20.0 | odoo/odoo#293734 ↗ | c5b453db88 ↗ |
[PERF] mail: faster regexp rendering html normalization is done once per recipient but it could be done only once, outside the loop. Time to send to all recipients (email of 3469 chars) ------------------------------ Recipents Before After Speed up 5 4.7ms 2.8ms x1.6 50 30ms 4ms x7.5 500 289ms 11ms x26 5000 2764ms 95ms x29 Time per recipient ------------------ Recipents Before After Speed up 5 940µs 560µs x1.6 50 600µs 80µs x7.5 500 580µs 22µs x26 5000 550µs 19µs x29 task-6617461