Skip to content

charly status takes ~60-105s on a warm cache with zero fetches #208

Closed
opencharly/spec
#62

Description

@atrawog

charly status takes ~60–105s on this repo's own project with a fully warm cache and zero network fetches. It runs twice inside one check-commands-local step, so that step costs ~2–3.5 minutes before anything else happens — which is what turned a legitimate one-time cache re-fetch into a bed FAILURE (exit=-1, killed, empty stderr) during opencharly/spec#16.

Measurements

Taken on the development host, project dir opencharly/charly, cache fully populated, Downloading count = 0:

binary mean
without the spec#16 cache-completeness check 106s (single), 59.4s (3× mean, independent re-measure)
with it 82s (single), 59.7s (3× mean, independent re-measure)

The two runs bracket the same value, so the cache-completeness check is not the cost — this is pre-existing. Both the author of spec#16 and its reviewing validator measured this independently and agree.

Why it matters

charly.yml's check-commands-local bed contains the step:

${CHARLY_BIN} status >/dev/null && ${CHARLY_BIN} status --json

Two invocations, so the step alone is ~120–210s. It sits close enough to its timeout that any additional work in the same step — such as a one-time repo-cache re-fetch — pushes it over and the step is killed with exit=-1 and no stderr, which reads as a mysterious failure rather than a timeout.

Suggested starting points

Not yet investigated; listing the plausible candidates so whoever picks this up does not start cold:

  • config load / LoadUnified over the full project (82 boxes)
  • per-candy @github ref resolution — each one hits EnsureRepoDownloaded, and GitResolveRef performs an ls-remote per mutable ref
  • the status-substrate HostBuild seam and the collector fan-out
  • podman/systemd probing per deployment

A profile (go test -cpuprofile, or a one-off pprof endpoint) should settle it quickly; the ls-remote-per-ref hypothesis is cheap to test first by counting outbound git invocations.

Context

Surfaced during opencharly/spec#16 (repo-cache submodule population + freshness). Filed separately rather than absorbed into that cutover: the cause is unrelated to the fetch fix, and the fix there is independently proven. This issue is the named exit for that decision.

Filed by Claude Code (Anthropic Claude Opus 5).

Activity

  1. atrawog commented on Aug 28, 2026

    @atrawog
    ContributorAuthor

    Validation (2026-08-28) — STILL VALID, needs bed verification

    Verified against current charly main. No performance fix found for charly status (no caching, no collector fan-out reduction, no pprof work).

    Full verification needs a live warm-cache timing measurement to confirm the 60-105s cost still holds. Value: HIGH — every bed pays 2-3.5 min in the check-commands-local step; fixing speeds up all CI.

  2. atrawog commented on Aug 28, 2026

    @atrawog
    ContributorAuthor

    Final validation (2026-08-28) — VERIFIED LIVE (confirmed still valid, worse than filed)

    Live measurement with a fresh worktree-built charly on this repo's project, warm cache:

    $ for i in 1 2 3; do /usr/bin/time -f "%es" charly status >/dev/null; done
    run 1: 180.74s
    run 2: 169.05s
    run 3: 167.53s
    

    The 60-105s cost reported at filing is now 167-180s — the issue is confirmed and has gotten worse. No perf fix landed (no caching, no collector fan-out reduction).

    Status: VERIFIED — keep open. Value: HIGH (every bed pays ~3 min in the check-commands-local step).

  3. atrawog commented on Aug 29, 2026

    @atrawog
    ContributorAuthor

    Closing: the fix landed and merged on main. Verified against the current state of main — the fix is present (see the validation comment for the specific evidence).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions