Title: Generating Compile Cache Ahead of Runtime · Issue #58482 · nodejs/node · GitHub
Open Graph Title: Generating Compile Cache Ahead of Runtime · Issue #58482 · nodejs/node
X Title: Generating Compile Cache Ahead of Runtime · Issue #58482 · nodejs/node
Description: What is the problem this feature will solve? It is currently not possible to generate the compile cache without executing the files that will be cached. Currently, container images and lambda functions can't easily generate code caches a...
Open Graph Description: What is the problem this feature will solve? It is currently not possible to generate the compile cache without executing the files that will be cached. Currently, container images and lambda funct...
X Description: What is the problem this feature will solve? It is currently not possible to generate the compile cache without executing the files that will be cached. Currently, container images and lambda funct...
Opengraph URL: https://github.com/nodejs/node/issues/58482
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Generating Compile Cache Ahead of Runtime","articleBody":"### What is the problem this feature will solve?\n\nIt is currently not possible to generate the compile cache without executing the files that will be cached.\n\nCurrently, container images and lambda functions can't easily generate code caches ahead of the actual runtime, since the code may have effects you may not want to execute early.\n### What is the feature you are proposing to solve the problem?\n\nWould it be possible to add a way to generate the compile cache without executing the relevant files, i.e. walking the module tree from the entry point, generating caches along the way?\n\nPerhaps something like `node --generate-compile-cache path/to/entrypoint.mjs`\nand/or\n```ts\nmodule.generateCompileCache(\"path/to/entrypoint.mjs\")\n```\n\n### What alternatives have you considered?\n\nYou may be able to work around this by adding \"dry-run\" code paths specifically for code cache generation, but this is a hacky workaround that can require massive effort.\n","author":{"url":"https://github.com/beeequeue","@type":"Person","name":"beeequeue"},"datePublished":"2025-05-27T13:39:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":15},"url":"https://github.com/58482/node/issues/58482"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2d2c8a77-3d28-6c45-a8cf-fd220b221b88 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE0C:39CFC7:1B96575:27E0878:6A4CFB3D |
| html-safe-nonce | 32d8915a6b43cbf0885ec81597e8e3006b58012dfd548686303461d02018aaf0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTBDOjM5Q0ZDNzoxQjk2NTc1OjI3RTA4Nzg6NkE0Q0ZCM0QiLCJ2aXNpdG9yX2lkIjoiMzA0MDY0MDMzNTQxNzc2ODc2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d894b6c73a87cb17874753c20da671e7fa48735a9cda24b99cdc14cdcf693a41 |
| hovercard-subject-tag | issue:3093990555 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/58482/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5182a8b43e4d9c4624c4d7a07b054eca35d731bbe87023e5a5aad869e4ecf923/nodejs/node/issues/58482 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5182a8b43e4d9c4624c4d7a07b054eca35d731bbe87023e5a5aad869e4ecf923/nodejs/node/issues/58482 |
| og:image:alt | What is the problem this feature will solve? It is currently not possible to generate the compile cache without executing the files that will be cached. Currently, container images and lambda funct... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | beeequeue |
| hostname | github.com |
| expected-hostname | github.com |
| None | 31e4db13a9e20081f2fac78f441659a6576e582bbb15e153f9c7fb6473aa29f5 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8307e9ba117a26e92a64fb1daf085d795a6552ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width