demo · v132
First-click latency — the interaction case
Google Workspace reported 5–7% cold-load wins from eager compile hints; the bigger story is interaction latency. Generate two large handler libraries — one with //# eagerCompilation=all, one without — then click each button and watch the first-click time delta.
library A — no hint (lazy)
— ms
library B — eagerCompilation=all
— ms
// Library B starts with: //# eagerCompilation=all // Library A starts with no comment. // Each library defines N closures; the click handler invokes them // in a hot loop. Lazy library: first call pays compile cost for // the whole call graph. Eager library: cost was paid at script load.
see also
- Explicit Compile Hints — feature index
- file-size compile timer
- Spec
- ChromeStatus entry