[IMP] ir.ui.view: optimize _compute_arch
Simply avoid computing a field when not necessary. This saves 0.5% of the total installation time. closes odoo/odoo#48967 X-original-commit: f3fa93228b6ea8e9e171aaa508ca0218d70406f3 Related: odoo/enterprise#9655 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
This commit is contained in:
@@ -268,10 +268,10 @@ actual arch.
|
||||
|
||||
for view in self:
|
||||
arch_fs = None
|
||||
xml_id = view.xml_id or view.key
|
||||
read_file = self._context.get('read_arch_from_file') or \
|
||||
('xml' in config['dev_mode'] and not view.arch_updated)
|
||||
if read_file and view.arch_fs and xml_id:
|
||||
if read_file and view.arch_fs and (view.xml_id or view.key):
|
||||
xml_id = view.xml_id or view.key
|
||||
# It is safe to split on / herebelow because arch_fs is explicitely stored with '/'
|
||||
fullpath = get_resource_path(*view.arch_fs.split('/'))
|
||||
if fullpath:
|
||||
|
||||
Reference in New Issue
Block a user