Repository navigation
perf: cut redundant GitHub calls, subprocesses and SQLite work on warm runs - #405
Merged
Merged
Conversation
…m runs - dashboard: compare bodies without the release-pinned footer, so a new release alone no longer re-reads and rewrites every dashboard - batch: run each batched PR's green gate and tree read concurrently (bounded); each gate still re-reads its PR after the checks - pull requests: put rebasing banners up and take them down concurrently, applying results in listing order; check for a bannered PR without projecting every PR in the inventory - lockfiles: read a warm clone's config once and set only keys that differ, instead of five git runs per regeneration; walk generated trees on the blocking pool - server: skip settings evaluation while the file and its local imports are unchanged; run remote-run installation and permission reads concurrently, judged in request order - cache: evict in one immediate transaction, only when over budget; index the server queue, delivery and installation scans (migration 018); use a set when pruning listed repositories
sweepies
marked this pull request as draft
November 24, 2026 06:19
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | 64a1450 | Commit Preview URL Branch Preview URL |
Nov 24 2026, 06:19 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second of three performance PRs. This one covers update, dashboard, batch, the lockfile checkout, server reload and remote auth, and the SQLite cache. It touches nothing hashed by
tests/state-versions.tsvortests/derived-versions.tsv.Changes
Dashboard (#364).
dashboard::reconcilenow hashes the body without the footer, because the footer's avatar is pinned to the running release. Before this, every weekly release triggered a fresh GET and a paced PATCH on every repository's dashboard. Now an unchanged dashboard under an older footer, with LF or CRLF line endings, sends no request. A real content change still rewrites the whole body, so the footer gets updated along with it.Batch green proofs (#388). In
batch::apply, each batched PR'sclean_and_greengate now runs concurrently with the others (buffer_unordered, at most 8, capped by the client's concurrency). The same goes for its tree read.automerge::clean_and_greenis unchanged: each gate still re-reads its PR afterChecksQuery, so a head that moved still fails the check. As before, the base tree is fetched once and only if some PR passed. Proofs land on their items by index.Rebasing banner (#361).
Lifecycle::announceandLifecycle::clearnow overlap their per-PR fresh reads and writes (buffered, at most 8). Results are applied in listing order.clearstill tries every PR and returns the first failure in listing order.receipts.rsused to project every inventory PR just to checkbanner::shown. It now projects only the PRs whose body shows a banner.Lockfile checkout.
git configruns per regeneration. It now readsgit config --local --list -zonce and sets only the keys that differ. A new clone is configured without the read.collectnow walks generated trees on the blocking pool.Server.
Settings::loadevaluates: plain file reads, no Pkl. It re-evaluates only when the file or one of its imports changed. Evaluation reads no environment, resources or network, so those modules' text fully decides the result. That means an edit to an imported module still reloads.installation()andauthorize()per-repository reads now overlap (at most 8). Answers are judged in request order, so the rejection still names the first failing repository.Cache.
evictno longer takes a write lock when the cache is within budget. When it is over budget, it deletes in one immediate transaction instead of one autocommit per row.server_deliveries(received_at),server_installations(expires_at)andserver_work(claimed, priority, available_at).repositories_listeduses aHashSet.Docs are updated: guide/dashboard, guide/server, internals/cache.
Tests
New tests:
tests/dashboard.rs).tests/write.rs, plus its transcript row).real_git_cache…). Also a unit test forlocal_config.EXPLAIN QUERY PLANshows the server scans use migration 018's indexes.On the boat VM:
-D warningsis clean.cargo test -p patchula-cache -p patchula-update -p patchula-tools -p patchula-serverpasses, run with--skip lockfiles::tests::real_.real_git_cache_is_reused_and_fetches_new_bases_incrementally_offlinepasses.cargo test -p patchula-engine -p patchula-clipasses. The depth pins didn't change.Locally,
hk checkpasses on the changed files with the clippy step skipped (clippy was run on the VM).Follow-ups (not done here)
notes_source_repositoryon a lasting release-notes failure would mean making it public incrates/notes/src/lib.rs. That tree is hashed by thechangelogrow oftests/state-versions.tsv, so it is left for a change that can bump that row.Bodies::composeis still computed separately byranges, the reuse check anddraft. Sharing it across their different lifetimes was not clean enough for this PR.Runner::installedreads one small JSON file. Moving it tospawn_blockingwould cost about as much as it saves, so it is left alone.