Skip to content

set CCACHE_BASEDIR to properly enable ccache on all builds#215

Merged
sxa merged 1 commit into
nodejs:mainfrom
sxa:ccache_dir_everywhere
Feb 23, 2026
Merged

set CCACHE_BASEDIR to properly enable ccache on all builds#215
sxa merged 1 commit into
nodejs:mainfrom
sxa:ccache_dir_everywhere

Conversation

@sxa

@sxa sxa commented Feb 20, 2026

Copy link
Copy Markdown
Member

Follow-up to #214 (which prototyped the change on riscv64 only) now that I've verified that it works ok on the Alpine builds (out most important ones as they are used by the docker-node project, so I expect this to work on all the others (and if it doesn't, we can fix it up later!)

Fixes #213

@sxa sxa self-assigned this Feb 20, 2026
@sxa
sxa marked this pull request as draft February 20, 2026 13:43
@sxa
sxa marked this pull request as ready for review February 20, 2026 22:35
@sxa sxa changed the title set CCACHE_BASE to properly enable ccache on all builds set CCACHE_BASEDIR to properly enable ccache on all builds Feb 21, 2026
@sxa
sxa force-pushed the ccache_dir_everywhere branch from 09d97f5 to 9a7e3e1 Compare February 21, 2026 12:20
@sxa

sxa commented Feb 21, 2026

Copy link
Copy Markdown
Member Author

Force push to fix commit message

@rvagg rvagg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm, do you have any ccache stats (or whatever that command is) to show them being used?

@sxa

sxa commented Feb 23, 2026

Copy link
Copy Markdown
Member Author

sgtm, do you have any ccache stats (or whatever that command is) to show them being used?

I didn't make a note after the first run but the build times for the second run in a different directory (building 25.6.0 then 25.6.1 from a clean cache) were significantly different after implementing this (about 2-3 times quicker)

Here's the final cache information after building those two (locally on my laptop with the alpine recipes) - although this was after rebuilding 25.6.1 one extra time which would have been completely cached.

alpine-unofficial:~/node-v24.6.1$ ccache -s
Cacheable calls:    37354 / 37566 (99.44%)
  Hits:             15923 / 37354 (42.63%)
    Direct:         12890 / 15923 (80.95%)
    Preprocessed:    3033 / 15923 (19.05%)
  Misses:           21431 / 37354 (57.37%)
Uncacheable calls:    212 / 37566 ( 0.56%)
Local storage:
  Cache size (GiB):   0.3 /   5.0 ( 5.52%)
  Cleanups:           512
  Hits:             15964 / 37395 (42.69%)
  Misses:           21431 / 37395 (57.31%)
alpine-unofficial:~/node-v24.6.1$ 

@rvagg

rvagg commented Feb 23, 2026

Copy link
Copy Markdown
Member

looks healthy 👍

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.

ccache effectively unused in unofficial-builds

3 participants