[Zope-dev] Record.pyd
Casey Duncan
casey@zope.com
Thu, 8 Aug 2002 09:40:38 -0400
On Thursday 08 August 2002 09:22 am, Johan Carlsson [Torped] wrote:
[snip]
> Thanks for the input Casey.
> (I'm still curious about Record.pyd, its not the first time I have wond=
ered=20
> what it does inside :-)
>=20
> Would your example scale well. I suppose it's not very Lacy?
Ooooo, lacy...
Nope it ain't, the example above is quick and dirty. To do it lazily you =
would=20
get the results presorted from the catalog (by name for above) and comput=
e=20
the statistics in batches. That would only load the records that were bei=
ng=20
grouped.
That would be only a minor change to the above code.=20
=20
> I envision a brain that would represent a group of records with methods
> for calculate statistical data when needed.
I suppose, but random access to groups would be pretty slow. I would favo=
r a=20
simpler walk over the list since brains are really designed for a one to =
one=20
brain to record mapping.
I think maybe a lazy grouping class that takes a lazy sequence as input c=
ould=20
be devised.
=20
> Well, it's something I need to think more about anyway.
indeed.
=20
> Best Regards,
> Johan Carlsson
good luck!
Maybe you should post a recipe on Zopelabs when you get it done.
-Casey