summaryrefslogtreecommitdiff
path: root/addons/web/static/src/scss/control_panel.scss
diff options
context:
space:
mode:
authorXavier-Do <xdo@odoo.com>2019-09-16 09:41:10 +0000
committerXavier-Do <xdo@odoo.com>2019-09-16 13:33:04 +0000
commitfc5934dc4541aeff4e819a9b3404a3cbb793453f (patch)
tree8db565a147b9a70e9ed0ea37cafe9a3e89a9fd6b /addons/web/static/src/scss/control_panel.scss
parentb57b194f6c6fe853916b9f63406c434cace8d52c (diff)
[FIX] base: fix rte translator timeout
In some cases, after installing a new language in rte_translator tour, some query using ir_translation table will become very slow. Identified query: SELECT res_groups_users_rel.uid, res_groups_users_rel.gid FROM res_groups_users_rel, "res_groups" LEFT JOIN "ir_translation" as "res_groups__name" ON ("res_groups"."id" = "res_groups__name"."res_id" AND "res_groups__name"."type" = 'model' AND "res_groups__name"."name" = 'res.groups,name' AND "res_groups__name"."lang" = 'en_US' AND "res_groups__name"."value" ! '') WHERE 1=1 AND res_groups_users_rel.uid IN (2) AND res_groups_users_rel.gid = res_groups.id ORDER BY COALESE("res_groups__name"."value", "res_groups"."name") OFFSET 0´ During post_install this query will become slower (between 0.7 and 2 seconds) ~50% of the time, when this usually take less than 0.1 second. For some tour step, this query is executed several times, making a simple /web loading going from less than one second to more than 10 second, breaking the tour. The main intuition behind that would be that the query plan completely fails, mainly because postgress is to busy and doesn't have time to launch an analyse when runbot load is high. This commit proposes to execute a manual ANALYZE on ir_translation table after a new language is installed. Tested with 40 builds, rte_translator never failed with this fix. closes odoo/odoo#36954 Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Diffstat (limited to 'addons/web/static/src/scss/control_panel.scss')
0 files changed, 0 insertions, 0 deletions