summaryrefslogtreecommitdiff
path: root/doc/reference/javascript_reference.rst
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2020-03-26 18:06:14 +0000
committerRomain Derie <rde@odoo.com>2020-03-26 18:12:47 +0000
commita5a57321c785d0c0718f413aeb8a149fbb164f95 (patch)
tree8385b6e53b0c9eab0b9f10ac35f8f769a97582a6 /doc/reference/javascript_reference.rst
parentaf68fcde4858b6a1e6c672b55f1465bf29e371cc (diff)
[IMP] website: perf - reduce SQL queries for the website menu
Render page flow: - Search website.page in _serve_page for requested URL - Check if the page is visible with `is_visible` - `is_visible` will get the `ir.ui.view` of the page Note that this is not 'cachable' as being visible depends of now() for the publishing date - Render layout which is getting the website menus Note that this can't be cached either as a menu visibility might also depends of it's website.page visibility which depends of now() - Checking menus `is_visible` fetch the menus pages and those pages views. Before this commit, every level of menu hierarchy would add 2 queries. This can be avoided by prefetching everything in once during the dispatch if we know we will render the website menu. In such a case, read `is_visible` on every website menus will fetch every pages, views and menus in the lowest SQL queries possible, eg one query for every table. For a 3 level menus, requests goes from 20 to 12 to load a untracked page. task-2211013
Diffstat (limited to 'doc/reference/javascript_reference.rst')
0 files changed, 0 insertions, 0 deletions