[Zope-CMF] Re: RFC: browser views and memoization

2006-01-16 Thread Vladimir Iliev
yuppie wrote: Hi! The skin scripts for complex forms in CMF like folder_contents are currently big monolithic blocks of code. All the values needed in the template are computed in a predefined order that makes sure expensive tasks like querying the catalog or listing folder contents are

[Zope-CMF] Re: RFC: browser views and memoization

2006-01-16 Thread yuppie
Hi Whit! whit wrote: yuppie wrote: I ended up using this method as decorator for most methods: def memoize(func): memo = {} def memoized_func(*args): if args not in memo: memo[args] = func(*args) return memo[args] return memoized_func Are there

[Zope-CMF] Re: RFC: browser views and memoization

2006-01-15 Thread whit
yuppie wrote: Hi! The skin scripts for complex forms in CMF like folder_contents are currently big monolithic blocks of code. All the values needed in the template are computed in a predefined order that makes sure expensive tasks like querying the catalog or listing folder contents are