From 13fc1380baa8ea3450fc1d9b6ddb25f94048b8ab Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Fri, 21 Sep 2018 14:01:27 +0200 Subject: [FIX] ir_ui_view: do not check arch twice upon install/upgrade After a module upgrade, validate the architecture of the module's views that are impacted by updates, but have not been checked yet. Before this patch, views were checked twice on average. This patch speeds up the installation of modules by about 15% without demo data. With demo data, the speedup is around 10%. --- odoo/modules/loading.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'odoo/modules/loading.py') diff --git a/odoo/modules/loading.py b/odoo/modules/loading.py index 6f2ee27c8e6..962559190c8 100644 --- a/odoo/modules/loading.py +++ b/odoo/modules/loading.py @@ -240,8 +240,9 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, if post_init: getattr(py_module, post_init)(cr, registry) - # validate all the views at a whole - env['ir.ui.view']._validate_module_views(module_name) + if mode == 'update': + # validate the views that have not been checked yet + env['ir.ui.view']._validate_module_views(module_name) # need to commit any modification the module's installation or # update made to the schema or data so the tests can run -- cgit v1.2.3