be01db2f712952a6c1d3688c8587d9624ef5dcc5
Computing the `cache_key` turned out to be a big factor during the lifespan of a `BaseModel.mapped` call and a lot of this time is spent computing the same `cache_key` over and over. These unnecessary computations can be easily reduced to a couple by moving the `cache_key` method on the environment (instead of the field) and by implementing a memo for that method. The rationale is that the `cache_key` of a field does not change for a given environment. The result of this patch is up to 50% faster `Field.__get__` which in turn means a GLOBAL gain in performance, especially for methods / functions that rely heavily on `__get__` such as `BaseModel.mapped`. closes odoo/odoo#42674 Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%