Warm sandboxes
After a command finishes, its sandbox stays warm for two minutes. A command that arrives in that window starts in about a second and finds file caches already populated. You are not billed for warm time. A sandbox is reused when the next command in the same workspace asks for the same versions and the same--cpu and --memory. Changing any of those starts
a fresh sandbox, which is slower for the first command. If you alternate
between two sets of limits, put the larger one in
proofpod.toml and use it for everything: unused
headroom is free.
Cold starts
A sandbox that has been idle for more than two minutes is shut down. The next command starts a new one, which has to read Mathlib’s files for the first time: the firstlake build in a new sandbox spends 15 to 30 seconds reading
Mathlib’s build metadata before it compiles anything.
Measured on a small project that imports all of Mathlib (Lean 4.36, default
4 cores):
Builds with nothing to rebuild
Before compiling, Lake checks that every module your project depends on is up to date. With Mathlib that is about 18,000 build records, and reading them through the sandbox’s filesystem takes about ten seconds. The same check takes two or three seconds on a local SSD. This overhead is fixed, so it disappears into any build that does real work. For a tight edit-check loop on one file, skip the build:pp --cpu 16 lake build.
First use of a version
If nobody has used your exact Lean and Mathlib versions before, the first command builds that environment. It takes about five minutes for a Mathlib environment, happens once per version for everyone, and is free.pp envs
lists the versions that are already built. See
Prebuilt environments.