Problem
- I have a huge hash (in my case a dictionary) which needs to be loaded everytime my bash script or cgi script is called.
- This takes already 10 seconds, which is too long.
- I want to be able to use all my variables and functions right away and not wait for them to be loaded.
Solution
- You dump an image of the current memory of clisp.
- This image is an executable file that contains all the code that has been loaded befor.(saveinitmem "/home/you/yourLispDir/lispImage.mem")
- Afterwards if you want to use it in a bash script, load it like this:clisp -M lispImage.mem
- This image will not work on other platforms nor versions of clisp
References