Skip to content

create compile caches on compile step#3004

Closed
anonrig wants to merge 13 commits intomainfrom
yagiz/create-compile-cache-step
Closed

create compile caches on compile step#3004
anonrig wants to merge 13 commits intomainfrom
yagiz/create-compile-cache-step

Conversation

@anonrig
Copy link
Member

@anonrig anonrig commented Oct 25, 2024

Work in progress.

The goal of this pull-request is to create an intermediary step between TypeScript compiler and Workerd compilation step to create compile caches. Compile caches will be used by the main binary to improve the startup time of the built-in modules (and only the built-ins).

Technical details:

The newly introduced binary accepts a string to the path of a file list that contains every path to be compile cached. With the current change the build process will slightly change to the following:

  1. Workerd runs typescript and compiles TS files.
  2. Each node.js built-in will be passed to the newly introduced binary to create a compile cache for the given paths.
  3. Workerd will be compiled and it will use the compile cache output from the creator binary if exists.

Limitations:

  • Currently, we only enable it for Linux. We can enable it for Windows, but since we're only using Linux on production, I don't think it's beneficial to support Windows.
  • We need to handle downstream repository and the isolate creation differences.

@anonrig anonrig requested review from jasnell and mikea October 25, 2024 20:07
@anonrig anonrig force-pushed the yagiz/create-compile-cache-step branch 7 times, most recently from 651bc4e to ac911a3 Compare October 28, 2024 15:47
@anonrig anonrig force-pushed the yagiz/create-compile-cache-step branch 2 times, most recently from 4e5b2c9 to 9417577 Compare October 28, 2024 17:18
@anonrig anonrig force-pushed the yagiz/create-compile-cache-step branch 2 times, most recently from 515dc86 to 902521e Compare October 29, 2024 14:07
@anonrig anonrig force-pushed the yagiz/create-compile-cache-step branch from 523aecd to b0b30c0 Compare October 29, 2024 18:50
@anonrig anonrig force-pushed the yagiz/create-compile-cache-step branch from b0b30c0 to 9a27009 Compare October 29, 2024 21:06
@anonrig anonrig requested a review from kentonv October 29, 2024 21:08
@anonrig
Copy link
Member Author

anonrig commented Nov 18, 2024

Since multiple PRs have landed, we can close this pull-request.

@anonrig anonrig closed this Nov 18, 2024
@anonrig anonrig deleted the yagiz/create-compile-cache-step branch November 18, 2024 17:09
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.

4 participants