Saturday, April 30, 2022
1 change · master
Enhancements to existing features
Odoo now requests only the necessary field details while preparing views, avoiding extra work such as loading translations that are not needed at that stage. This reduces processing time when opening or refreshing common screens, improving responsiveness without changing user-facing functionality.
Original PR description
Thanks to - odoo/odoo#87522 - odoo/odoo#87273 It's possible to speed-up the postprocessing of views by only requesting a few attributes to `fields_get`, therefore avoiding to load other costly attributes (e.g. string, help, selection translations) Before: ``` In [1]: %time for i in range(10000): env["res.partner"].get_views([(False, 'kanban'), (False, 'tree'), (False, 'form')]);env["base"].invalidate_cache() r"CPU times: user 9min 19s, sys: 10.9 s, total: 9min 30s Wall time: 10min 53s ``` After: ``` %time for i in range(10000): env["res.partner"].get_views([(False, 'kanban'), (False, 'tree'), (False, 'form')]);env["base"].invalidate_cache() CPU times: user 6min 39s, sys: 11.5 s, total: 6min 50s Wall time: 8min 14s ```