[darcs-devel] Help with alternate current formats: shall we slurp?

Juliusz Chroboczek jch at pps.jussieu.fr
Wed Jan 26 01:33:27 PST 2005


> (Plus, of course it's always fun to use infinite list, and even more fun
> when each element of the infinite list is so large that you really don't
> want to hold it in memory!)  ;)

David, I'm really sorry to be such a spoil-sport, but I think I have a
better solution that unfortunately has no hack value whatsoever.

I've been focusing on reusing slurpies, and in doing so I've
completely missed the point.  It's not slurpies that are expensive to
compute; it's the pristine tree that we build in surely_slurp_Current.

Instead of caching slurpies, what we need to cache is the pristine
tree.  Now the pristine tree remains on disk throughout the execution
of Darcs (thanks to the elegant hack done by Tomek).  All we need to
do is to memoise its location, and the natural place to put it is the
PristineNone structure.

I suggest we now focus on fixing any bugs I may have introduced
yesterday and getting 1.0.2 out; I'll take care of memoising the
pristine trees when I next have some hacking time.

                                        Juliusz




More information about the darcs-devel mailing list