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 wondered what it does inside :-)
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 get the results presorted from the catalog (by name for above) and compute the statistics in batches. That would only load the records that were being grouped. That would be only a minor change to the above code.
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 favor a simpler walk over the list since brains are really designed for a one to one brain to record mapping. I think maybe a lazy grouping class that takes a lazy sequence as input could be devised.
Well, it's something I need to think more about anyway.
indeed.
Best Regards, Johan Carlsson
good luck! Maybe you should post a recipe on Zopelabs when you get it done. -Casey