Skip to content

speed 🚄#142

Merged
damacus merged 1 commit intomainfrom
claude/speed-improvements-cf5O8
Mar 21, 2026
Merged

speed 🚄#142
damacus merged 1 commit intomainfrom
claude/speed-improvements-cf5O8

Conversation

@damacus
Copy link
Member

@damacus damacus commented Mar 21, 2026

speeds

Five targeted improvements — no behaviour changes, faster wall-clock
time on every task that touches multiple repos or notifications.

Taskfile — cleanup-noise
  Replace three sequential jq invocations over the same temp file
  (length, dismiss-id list, preserve count) with one jq pass that
  emits a compact JSON object; the three values are then plucked with
  cheap echo-pipe reads, saving two subprocess forks per run.
  Replace the sequential PATCH-per-notification loop with a batched
  background loop (10 concurrent): each batch of 10 dismissals fires
  in parallel and waits before the next batch. With 100+ notifications
  this reduces dismiss time ~8×.

scripts/manage-webhooks.sh — check_webhooks()
  Was calling gh api repos/.../hooks twice (once to display, once to
  count active). Now fetches the JSON array once into a local variable
  and pipes it through jq twice — halves the API calls per repo.

force-merge-prs.fish
  Was calling gh pr view twice per matched PR (separate --json title
  and --json state requests). Now fetches --json title,state in one
  call and parses both fields from the single response.

scripts/list-release-prs.fish
  gh pr list already returned title in its JSON payload but the code
  extracted only number and then made a second gh pr view call to
  fetch the title again. Now emits [number, title] as @TSV from the
  list call and parses inline — eliminates one API call per matched PR.

scripts/cancel-workflow-runs.sh
  The repo loop was fully sequential: one gh run list call per repo,
  then one gh run cancel per in-progress run, all blocking. Extracted
  the per-repo logic into _cancel_repo(), exported it, and replaced
  the loop with xargs -P 8 so up to 8 repos are checked concurrently.
  The TOTAL_CANCELLED aggregate counter is removed (subshells cannot
  update the parent scope); individual cancellations are still logged.

https://claude.ai/code/session_01SFKChTX8gNGNmh4in5Fj8W
@damacus damacus merged commit c7fe5c8 into main Mar 21, 2026
@damacus damacus deleted the claude/speed-improvements-cf5O8 branch March 21, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants