summaryrefslogtreecommitdiffstats
path: root/build/scripts/JavacDaemon.jar
Commit message (Collapse)AuthorAgeFilesLines
* conf var feature flag (__NO_UID__) + shallow root-based cache diriniklyaev2026-07-021-0/+0
| | | | | | | | | | **Feature-flag the persistent javac/kotlinc daemon and relocate its runtime dir to SHALLOW_ROOT** The javac/kotlinc daemon is now opt-in via `ya make -DYA_JAVAC_DAEMON` (default off). Toggling it does not change node UIDs; enabling/disabling the daemon never invalidates the build cache. The daemon's runtime dir (jar \+ logs) moves from `/tmp` to ya's `$(SHALLOW_ROOT)` via `YA_JAVAC_DAEMON_HOME`, so it works in environments where `/tmp` is unwanted. The unix socket stays in `/tmp` because of the AF_UNIX path limit; the socket name gains the jar hash to distinguish daemon versions across protocol changes. This code is LLM-generated. commit_hash:179a98b265f6458d04a6bf6c7d02721c90cc355b
* Javac/kotlinc daemon [AI generated]iniklyaev2026-06-301-0/+0
**Persistent javac/kotlinc compilation daemon for `ya make` (opt-in)** **Note:** the code in this PR was generated mostly by an LLM. This PR adds an opt-in persistent compilation daemon that runs `javac` and `kotlinc` in-process inside a long-lived JVM, instead of spawning a fresh subprocess per build node. Each Java/Kotlin module today pays the full JVM \+ compiler startup cost (\~150–340 ms of startup, plus \~55 MB of kotlinc class-loading) on every node, which dominates the wall time of short compiles; amortizing that startup across all nodes in a build session yields measurable speedups (1.3x–3.7x CPU economy on the benchmarked targets, with zero correctness fallbacks or failed nodes). The daemon (`devtools/buildstep_tools/javac_daemon`, a `JAVA_PROGRAM` built to a committed `JavacDaemon.jar`) listens on a Unix domain socket and runs both compilers concurrently; a thin Python client in the existing build scripts (`javac_daemon_client.py`, wired into `run_javac.py` / `compile_java.py` via `build/conf/java.conf`) decides per-node eligibility, routes launcher flags, selects/launches the right daemon instance, and **always falls back to a plain subprocess** on any doubt (old JDK, resource JVM flag, denied annotation processor, daemon error), so build correctness never depends on the daemon. The feature is **off by default** and activated only via `YA_JAVAC_DAEMON=1` passed to `ya make`; without it the build uses the existing subprocess path unchanged. See `junk/iniklyaev/javac-daemon/DESIGN_javac_daemon.md` for the full design, flag-routing rules, fault-isolation model, and benchmark methodology. commit_hash:f4e07c5bb51064e0bc24539348e01a85ff63a835