Vauxoo / odoo

Fork of Odoo (formerly OpenERP). [This project is not publically mantained just born for internal usage with some little patches] go to official repository on github.com/odoo/odoo
https://www.odoo.com
Other
9 stars 9 forks source link

[REF] Use website_public_lst_price_usd field instead of price #556

Closed JJRR5 closed 1 year ago

JJRR5 commented 1 year ago

Optimize performance by utilizing the pre-calculated prices stored in the website_public_lst_price_usd field within the _website_product_id_change method. This approach eliminates the need for unnecessary price recomputations, resulting in a significant speed improvement of approximately 90%.

Results

Before _website_product_id_change method image_2023-07-18_18-43-48 image_2023-07-18_18-44-24

After image_2023-07-18_18-46-31

image_2023-07-18_18-46-55

Flamegraph

image_2023-07-18_18-52-25 image_2023-07-18_18-51-59


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr