Commit 7f920b14 authored by Jérome Perrin's avatar Jérome Perrin

xhtml_style: drop useless CachingMethod

This function have evolved to something very trivial not accessing anything from database, so caching this no longer really makes sense, also the cache keys are really big.

On a quick benchmark of calling ERP5Site_getTabList 10000 times:
with cache: ERP5Site_getTabList took 12.961781
without cache: ERP5Site_getTabList took 5.395873
parent 7c179dbd
from Products.ERP5Type.Cache import CachingMethod
def getTabList(status_dict, info_dict, add_all_tabs): def getTabList(status_dict, info_dict, add_all_tabs):
tab_list = [] tab_list = []
basic_mode = status_dict.get('basic_mode', 1) basic_mode = status_dict.get('basic_mode', 1)
...@@ -68,10 +66,6 @@ if not add_all_tabs: ...@@ -68,10 +66,6 @@ if not add_all_tabs:
status_dict = context.ERP5Site_getConfiguredStatusDict() status_dict = context.ERP5Site_getConfiguredStatusDict()
info_dict = context.ERP5Site_getCategorizedModuleActionInformationDict() info_dict = context.ERP5Site_getCategorizedModuleActionInformationDict()
getTabList = CachingMethod(getTabList, \
id = 'ERP5Site_getTabListInternal', \
cache_factory = 'erp5_ui_long')
return getTabList(status_dict = status_dict, \ return getTabList(status_dict = status_dict, \
info_dict = info_dict, \ info_dict = info_dict, \
add_all_tabs = add_all_tabs) add_all_tabs = add_all_tabs)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment