[Zope-dev] LOTS of roles?
Paul Winkler
pw_lists@slinkp.com
Wed, 26 Feb 2003 01:05:46 -0500
On Tue, Feb 25, 2003 at 11:33:54PM +0100, Dieter Maurer wrote:
> Paul Winkler wrote at 2003-2-24 16:27 -0500:
> > ...
> > > It is easy to optimize this to "u + a" (via a dictionary),
> > > then thousands of roles should not be a problem.
> >
> > would that mean you have to build a (potentially huge) dictionary every
> > time? I'd greatly appreciate it if you could expand on this suggestion.
>
> Even when you create the dictionary anew each time, it will have
> (almost) "u+a" complexity.
>
> However, the dict might be cachable in volatile variables
> (i.e. "_v_" variables).
good idea, thanks.
> As it is not my problem, I am a bit reluctant to search
> for optimazation possibilities.
understandable... for anyone else who's interested, i just found this
by Alex Martelli:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52303
--
Paul Winkler
http://www.slinkp.com