[racket] Goldilocks: install too big, install-plain too slow

From: Daniel Farina (daniel at heroku.com)
Date: Wed Nov 28 17:23:07 EST 2012

Hello,

I'm working on a racket buildpack for use on Heroku (again -- I tried
and aborted it about a year ago) but have noticed that the size of
Racket and startup time in racket applications suffers quite a bit
because 'make install' installs all kind of stuff: mzscheme
compatibility libs, gui libs (on a system with no gui stuff), textbook
curricula languages, et al.

These bloat the size of racket's build output by quite a bit, and more
subtly, increase the number of file system metadata operations
required to extract racket and the application on start-up.

I have tried the install-plain make target and it is indeed much
smaller, but it compiles/installs very little -- no raco, and
apparently very little byte-compiling, because the racket REPL takes
an age to load -- so it's basically unworkable.

Is there a reasonable in-between option?

In spite of this issue, I have gotten racket building successfully
(with a few hiccups) and maybe pretty soon deploying a racket program
on Heroku will be very simple, although I'm sure some refinements to
the 'build pack' will make things better still.

In particular, I'm thinking about crawling through the submitted
racket source and finding all (require) forms as to evaluate them
up-front at submission time: because running programs do not have a
persistant file system, not doing this would result in every freshly
started program downloading from PLaneT over and over, and, if PLaneT
were to go down, no non-trivial racket program could start up
successfully.

Cheers,

--
fdr

Posted on the users mailing list.