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
Showing
-
Owner
snippet used for that measurement:
import time class timeblock: def __init__(self,descr=''): self.descr=descr def __enter__(self): self.t0=time.time() return self def __exit__(self, type_, value, traceback): self.t1=time.time() self.elapsed = self.t1-self.t0 def __str__(self): return ('%s took %0.6f' % (self.descr, self.elapsed)) ERP5Site_getTabList = context.ERP5Site_getTabList with timeblock("ERP5Site_getTabList") as t: for _ in range(10000): ERP5Site_getTabList() return str(t)
Please register or sign in to comment