Skip to content

perf: speed up action startup by dropping per-call uv overhead#9

Merged
vanandrew merged 1 commit into
mainfrom
speed-up-action
Apr 22, 2026
Merged

perf: speed up action startup by dropping per-call uv overhead#9
vanandrew merged 1 commit into
mainfrom
speed-up-action

Conversation

@vanandrew

Copy link
Copy Markdown
Owner

Summary

  • Swap install from uv venv + uv pip install to uv tool install, putting difftrace on PATH and removing uv run wrapper overhead on every subsequent invocation.
  • Collapse the five uv run python3 output-parsing calls (1 json.tool pretty-print + 4 separate -c parses for affected / matrix / test_all / count) into one python3 heredoc that emits all values together. Uses a tmpfile + four reads — portable across bash 3.2 and 5.x.
  • Net effect: ~1s of venv-activation overhead shaved off each action run; install step is also slightly simpler.

Test plan

  • Test Action workflow (.github/workflows/test-action.yml) passes for all matrix legs: single-lock, multi-lock, multi-lock downstream fan-out, single-lock downstream fan-out, inputs pass-through, and the missing-lock negative case.
  • Output JSON shapes unchanged (affected list, matrix with either {"package": [...]} or {"include": [...]}, has_affected, test_all).
  • Step summary table still renders correctly.

Switch install from `uv venv` + `uv pip install` to `uv tool install`,
putting `difftrace` directly on PATH and eliminating `uv run` wrapper
overhead on every subsequent invocation.

Collapse the five `uv run python3` output-parsing calls (json.tool
display + 4 separate `-c` parses) into a single `python3` invocation
that emits affected/matrix/test_all/count together. Saves ~1s of
venv-activation overhead on each action run.
@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.08%. Comparing base (01c0d3c) to head (de8fdc2).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #9   +/-   ##
=======================================
  Coverage   98.08%   98.08%           
=======================================
  Files           6        6           
  Lines         470      470           
=======================================
  Hits          461      461           
  Misses          9        9           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vanandrew vanandrew merged commit ea7e141 into main Apr 22, 2026
41 checks passed
@vanandrew vanandrew deleted the speed-up-action branch April 22, 2026 19:32
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.

1 participant