← Back to Pull requests

precompile: Compile the precompile worker's Base code into the sysimage again #63795

Merged
IanButterworth merged 1 files (5 lines) on Oct 14, 2026 11:44 UTC
View on GitHub
IanButterworth IanButterworth commented on Oct 13, 2026 18:46 UTC
Author

Some fixes to tighten up repeated compilation seen in package precompilation.

Claude:

---

Each package precompile worker was compiling Base code that should come from the system image. Precompiling 245 packages one at a time (all stdlibs plus DataFrames, CSV, Plots, ForwardDiff, OrdinaryDiffEqTsit5), Base-side compilation in the workers drops from 21.4 s to 14.7 s, measured with --trace-compile-timing.

  • The sysimage build dropped the worker's trace (regression from #62281). The build's precompile worker is traced with --trace-compile-timing, so its lines start with a #= time =# comment, and the generator skips lines starting with #. 9 signatures were compiled in every worker, ~19 ms per worker.

  • Writing preferences into the cache wasn't traced. The generator's package now records a compile-time preference, which covers most of the TOML printing that ~80 workers compiled.
  • Most of what remains is Dates invalidating the Base TOML printer (since #61210). get_preferences_blob and the top-level print call are recompiled when writing the cache of every package that reads a preference, 5.3 s over 151 workers. That needs a separate fix.

    Package loading was already covered: 245 fresh requires compiled almost nothing the sysimage could hold.

    Both bugs are on release-1.13, and the commits apply there cleanly.

    Written with Claude Code (Opus 5.5).

    Diff: 5 lines (+4 / -1) across 1 files Reviewer: vtjnash Review duration: 1018m
    All Vouch review confidence checks passed
    Residual risk 0.02 = Change Risk (0.19) × (1 − Review Confidence (0.91)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.19 · 5 lines diff across 1 files
    0.19
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.89 · 4 substantive comment(s)
    0.89
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    90%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.107
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    6 items
    vtjnash vtjnash commented on code on Oct 14, 2026 02:22 UTC
    Code Review
    base/toml/printer.jl:1
    @@ -295,7 +295,7 @@ function print_table(f::Function, io::IO, a::AbstractDict,
         # First print non-tabular entries
         for key in akeys
             value = a[key]
    -        if !is_valid_toml_value(value)
    +        if !@invokelatest(is_valid_toml_value(value))

    This is unsound now, since the function it guards isn't in the same world as the function is calls

    vtjnash vtjnash commented on Oct 14, 2026 02:23 UTC
    Reviewer

    Drop the TOML changes, it isn't what invokelatest seems intended for

    IanButterworth IanButterworth commented on code on Oct 14, 2026 02:32 UTC
    Code Review
    base/toml/printer.jl:1
    @@ -295,7 +295,7 @@ function print_table(f::Function, io::IO, a::AbstractDict,
         # First print non-tabular entries
         for key in akeys
             value = a[key]
    -        if !is_valid_toml_value(value)
    +        if !@invokelatest(is_valid_toml_value(value))

    I thought this was ok.. it's used just above this (I'm aware this is a bit of a deja vu from that other PR kristoffer has)

    vtjnash vtjnash commented on code on Oct 14, 2026 02:58 UTC
    Code Review
    base/toml/printer.jl:1
    @@ -295,7 +295,7 @@ function print_table(f::Function, io::IO, a::AbstractDict,
         # First print non-tabular entries
         for key in akeys
             value = a[key]
    -        if !is_valid_toml_value(value)
    +        if !@invokelatest(is_valid_toml_value(value))

    True, I was about to comment on #63787 that we need to de-duplicate between the two PRs

    IanButterworth IanButterworth commented on code on Oct 14, 2026 03:06 UTC
    Code Review
    base/toml/printer.jl:1
    @@ -295,7 +295,7 @@ function print_table(f::Function, io::IO, a::AbstractDict,
         # First print non-tabular entries
         for key in akeys
             value = a[key]
    -        if !is_valid_toml_value(value)
    +        if !@invokelatest(is_valid_toml_value(value))

    Dropped the TOML stuff

    Reviewers
    Assignees
    IanButterworth IanButterworth
    Labels
    risk: low confidence: 90.6% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 18.7% (LOW) · Higher = larger blast radius
    18.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 90.6% · Lower = rushed or shallow review
    90.6%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 2% · Safe to merge
    2%