PerformanceHighlight of Weekly #003

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.

Versions18.019.020.0
ModulesDiscuss mail
AppProductivity

Pull requests and commits

BranchPull requestCommit
18.0odoo/odoo#291756 ↗60b7af67e4 ↗
19.0odoo/odoo#292921 ↗3008dda3b0 ↗
20.0odoo/odoo#293734 ↗c5b453db88 ↗

Commit message

[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

My stack

Pick the versions and apps you run. Weekly digests, this week's table and All changes then show only what concerns you. Saved in this browser.

Versions
Apps
Modules