Under JOLT_OPTIMIZE a -m program run inferred + specialized EVERY loaded namespace, including every transitive dependency. On a dep-heavy app that's prohibitive: malli-app cold-started in ~2m10s (hundreds of dep namespaces, each run through the per-form inline + inference passes). The closed world a whole-program pass reasons over is the APP, not its libraries. jolt-deps now passes the project's own source roots (its deps.edn :paths) to the runtime as JOLT_APP_PATHS. A namespace loaded from an app root gets full optimization (and joins the one whole-program fixpoint); a dependency namespace compiles at default cost — :inline? off for its load, so the per-form optimize passes don't run over library code — staying direct-linked but generically typed (the open-world default). With no app roots declared (a bare program run, or jolt without jolt-deps) everything counts as app, so behavior is unchanged. malli-app JOLT_OPTIMIZE cold start: 2m10s -> 4.5s. Compute-heavy programs whose hot code is their own namespaces (the typed ray tracer) are unaffected — their code is app code and still fully optimized (9s/frame render). Applied at runtime in main for the same baked-at-build-time reason as JOLT_PATH; added to the ctx-image cache key. Help text corrected: optimization is opt-in, not default. Co-authored-by: Yogthos <yogthos@gmail.com> |
||
|---|---|---|
| .. | ||
| bench | ||
| clojure-stdlib/clojure | ||
| integration | ||
| spec | ||
| support | ||
| unit | ||