Scribble examples performance

42 views
Skip to first unread message

Jack Firth

unread,
Oct 19, 2019, 3:43:47 AM10/19/19
to Racket Users
The Scribble docs for my Rebellion package take nearly two minutes to build. I have a hunch that most of the time is spent compiling, evaluating, and rendering example code. Every one of my Scribble modules is structured roughly like this:

#lang scribble/manual

(require ...)

(define make-evaluator
 
(... build an evaluator factory using make-base-eval-factory ...))

...

@defwhatever[...]{

 
@(examples
   
#:eval (make-evaluator) #:once
   
... example code here ...)}

Does this pattern have any performance or memory usage problems? Is there more I can do to speed things up? How do I profile Scribble docs? Is it normal for `raco setup` to spend much more time building my documentation than it spends actually compiling my library's code?

Sam Tobin-Hochstadt

unread,
Oct 19, 2019, 11:05:32 AM10/19/19
to Jack Firth, Racket Users
One thing that's important that we've found improves performance is to close the evaluator at the end of the module. 

Sam

--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/ecf4481e-601f-4883-92bd-0506b35957c5%40googlegroups.com.

Jack Firth

unread,
Oct 19, 2019, 1:58:12 PM10/19/19
to Sam Tobin-Hochstadt, Racket Users
I think the evaluators are being closed, because I'm using make-base-eval-factory and the #:close option. Do evaluator factories need to be closed?
Reply all
Reply to author
Forward
0 new messages