nodejs / nodejs/build

Caching more build artifacts (e.g., all of V8)

Open
#2,949 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted never stale question
Dominant language
Jinja
Stars
541
Forks
185
Avg merge
22h 15m
Merged PRs (30d)
4

Description

I wonder if we should be trying to cache more build artifacts. (And if there is a tracking issue for this somewhere already, please feel free to close this one.)

I believe we are using ccache on many Jenkins systems, but some build times are still slow. The "Test Linux" GitHub Action takes about two hours, and building alone often accounts for about 75% of those two hours. We can try not to run the job as often, but I'd still like to see build times go down.

I don't have data to back this up, but I have a feeling that we waste a lot of time and other resources by building V8 every time. Locally, ccache helps with that, but switching between branches or fetching commits that update V8 cause extremely long build times still. Could we cache entire V8 builds? Maybe even in a way that allows us to download cached V8 builds for local builds whenever V8 is updated in node core. This could be an opt-in feature as part of the build process (with some necessary security precautions) and maybe greatly speed up builds both locally and in CI.

This seems like something that we have likely considered in the past, so it probably isn't trivial to do or we probably would have done so already. Or maybe it won't give us the build time improvements I am hoping for.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing Test Linux GitHub Action and the current ccache usage across Jenkins systems. Compare the time spent building V8 with the available caching approaches, including their security and branch-switching implications. Done means a concrete, measured decision on whether cached V8 artifacts are feasible and what scope an implementation would require.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, node.js
Domain
build-system, ci-cd, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.