diff options
| author | Alexandre Kühn <aku@odoo.com> | 2020-01-08 09:54:37 +0000 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2020-01-08 14:08:14 +0000 |
| commit | e4850c1bb579c440e4c6716b170a3ad4c33531e3 (patch) | |
| tree | c3df951b83280998ed2dc23b2c8052bc62821614 /addons/website_event/data | |
| parent | 9b9710f61d173ef5376e2b52e458229559bde144 (diff) | |
[FIX] mail: faster opening of messaging menu
Before this commit, opening the messaging menu might be slow.
This was caused by the parsing of bodies of messages with lots of
HTML nodes. Indeed, the body of a message is linkified and inlined,
and both processes were quite slow due to their implementation: each
node in the HTML were recursively parsed and re-assigning
`innerHTML`. As a result, each node was triggering an HTML parse,
which is very slow on complex nodes.
This commit fixes this performance issue by speeding up inlining and
linkifying of html strings. In the case of linkify, it now triggers
an HTML parse only when necessary, while inlining now relies on its
textContent value.
These changes should drastically improve the speed of opening and
rendering messaging menu, almost ten times faster.
Task-Id 2076299
closes odoo/odoo#42949
X-original-commit: 8db0afb50ce0853a6a8ab7ee11dd5ed876abab64
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/website_event/data')
0 files changed, 0 insertions, 0 deletions
