[plt-scheme] persistent data (i.e., between runs)
I feel as though I should know the answer to this question, but I don't:
Is there any simple way to preserve a value between evaluations of a
program in the definitions window?
The situation is this: I'm working with a big xml expression (35 Meg
in s-expression form, 7 Meg written as a .zo), and successive
evaluations of the program that reads the data from disk are
squonching my DrScheme. In particular, DrS gets many megabytes
bigger each time I evaluate the program, and running it more than
four or five times crushes my poor little 512Meg Mac Mini. More
precisely: I have to force-quit DrScheme.
Now, this may or may not be a memory bug--DrScheme 3m lasts much
longer, but still grows by ten or twelve megabytes each time I hit
execute--but I'm thinking that there should be some way to keep a
value around and not have to keep reading it from disk.
My first thought was that by pushing its evaluation into a module
that was require-for-syntax'ed that I would avoid the re-evaluation,
but some small experiments showed me the fallacy of this.
My second thought was that I could write a tool that attached a
module containing the definition to the namespace before evaluating
the definitions window, but this seemed complex and (hopefully)
unneccessary.
Is there an easy way to get what I want? A help desk search on
'persistent' turned up nothing.
Thanks,
John