summaryrefslogtreecommitdiff
path: root/addons/web_linkedin/web_linkedin.py
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2014-07-17 17:18:14 +0200
committerOlivier Dony <odo@openerp.com>2014-07-17 18:46:10 +0200
commit15174e9a70b07f95356bf0a75887e2a02b33baab (patch)
tree1b145dc5ec316028a465305dcdc94105e941dbb4 /addons/web_linkedin/web_linkedin.py
parent68aa292f0a61b884e5be6fa403083a5650f36e9a (diff)
[IMP] base, mail: cache user.has_group() + ir.ui.menu.load*()
Loading the menus is the most expensive operation for an average page load, and the result does not change often. The menu filtering already uses a separate cache based on groups, but the rest of the loading includes reading actions and translating menu names, which is also expensive. Added a cache keyed on user + user lang, plus relevant cache invalidation when any of the following are touched: access rights, user data including groups and language, menus or mail.group subscriptions. The menu filtering cache is still useful in parallel has it is invalidated under different conditions. User.has_group() is cheap but still called very often, so it is an easy win as well, and also frequently used when rendering page templates.
Diffstat (limited to 'addons/web_linkedin/web_linkedin.py')
0 files changed, 0 insertions, 0 deletions