diff options
| author | Xavier Morel <xmo@odoo.com> | 2019-04-08 11:40:08 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2019-04-08 11:40:08 +0000 |
| commit | 265926f971d9f77322885c60e9e40ae45ca855f7 (patch) | |
| tree | e9c47e4a20ab02722722d7928a61a196d592b56c /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | be8af5dc9cd82dee95e8e0aeea85f72d6345b1fd (diff) | |
[IMP] website_sale: overhead on every page
website_sale adds a call to sale_get_order to ~every website page (in
order to validate & display the shopping cart).
Before this change, this calls get_pricelist_available() and triggers
two different computations of property_product_pricelist on every page
even for a public user with no cart / SO. This, in turn, generates ~20
queries and adds 20ms (total) / 10ms (sql) to ~every page load.
Fix: early return if the user doesn't have an SO (either in session or
in DB) and we're not in a case where we want to force one.
Loading "/" with just website_sale installed on a new DB,
- before: 53 queries, 31ms ±5 (sql), 75ms ±5 (all)
- after: 32 queries, 21ms ±1 (sql), 53ms ±3 (all)
closes odoo/odoo#32492
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
