"scribble" is the racket documentation tool. I have got a problem with the following example. When N=30, scribble uses ~500M memory. It seems very difficult to have more than 300 such examples in a single scribble document.
cat <<EOF
#lang scribble/manual
@(require scribble/eval)
@title["hello world"]
EOF
N=30
for((i=0;i<N;i++));do
cat <<EOF
@(examples
(require racket/snip)
(require racket/class)
(make-object image-snip% "a.jpg"))
EOF
done
) > x.scrbl
scribble x.scrbl
I think
examples
creates a new evaluator each time, which is rather expensive. If possible, create a single evaluator for your entire document:That should use significantly less memory.