diff options
| author | Jeremy Kersten <jke@odoo.com> | 2020-04-23 12:49:22 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2020-04-27 13:49:01 +0000 |
| commit | 8e081ec61fa305d224853ef588043373284271b7 (patch) | |
| tree | 7ba9afaa10a0288d5d0d439fe5a67697e79cb355 /addons/website/static/src/xml/website.contentMenu.xml | |
| parent | 54048cb2280ff3036a11f1b25bb36d25020b4887 (diff) | |
[IMP] website_blog: avoid exists() in loop
`tags_list()` is called in loops to get nicely formatted URL in blog tag button
but doing an exists here will do everytime an SQL query regardless of the
cache.
We can safely remove the call to `exists()` as the `tag_ids` parameter is
coming from the controller `active_tag_ids` key which is already ensuring the
exists condition.
It make also the number of requests determinists for test with a random number
of tags. From between 200 ~ 300 queries (depending number of tags)-> 116
task-2211013
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
Diffstat (limited to 'addons/website/static/src/xml/website.contentMenu.xml')
0 files changed, 0 insertions, 0 deletions
