Support streaming vs independent network/tar actions.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the enhancement
Hello! I'm working on optimizing some of our CI workloads. One of the things that I noticed in that process is that the actions/cache logic runs download/upload and compress/decompress as separate actions. I think we can squeeze more performance out by utilizing streams and skipping writing to and reading from the fs for the cache.
For the use case I'm looking at specifically, the cache save step takes ~38s and the restore takes 22s (~4s download, ~18s uncompress). I think the biggest benefit for us will come from upload, but I can't tell from the logs how long each portion takes.
Is this something you'd be open to? I am open to help make this happen, but I wanna get confirmation before digging any further.
Code Snippet
Before:
await download(url, location); // <-- downloads, saves to disk
await untar(location); // <-- reads from disk, doesn't start until download is complete
After:
await downloadAndUntar(url); // <-- streams, avoids writing to then reading from fs, starts decompressing immediately
Additional information
Add any other context about the feature here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the actions/cache download and upload flow, including the separate compress/decompress actions described in the issue. Compare the current download(url, location) and untar(location) sequence with the proposed downloadAndUntar(url) stream; done means network and tar work can stream without the intermediate filesystem write and read.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devops, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100