[racket] Typed Racket startup time

From: Vincent St-Amour (stamourv at ccs.neu.edu)
Date: Sun Aug 28 21:59:00 EDT 2011

At Sun, 28 Aug 2011 20:20:05 -0400,
Shriram Krishnamurthi wrote:
> In a blank #lang racket buffer, if I hit F5, I get a repl cursor almost
> instantaneously. If I do the same in typed/racket, it takes roughly three
> seconds every time. This can't be blamed on parse time since the buffer is
> empty! What gives? (And Sam, do you regard this as a ux bug?)

We're aware of the problem, and we're always trying to make Typed
Racket startup faster.

The main problem is that creating and filling up the base type
environment takes a long time. This is something that needs to be done
for any Typed Racket program, including the empty program. Since the
base type environment is not serializable, it needs to be
reconstructed from scratch each time.

We've improved startup time by about 20% on friday. We're also
planning to try lazily loading the base environment, but given that
bindings for racket/base alone account for a significant portion of
the startup time, it's unclear how much of an improvement lazy loading
can be.

Since this only happens at expansion time, compiled Typed Racket
programs do not suffer from this long startup time.

Vincent


Posted on the users mailing list.