Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement: improve cli startup performance using v8 cache #6049

Merged
merged 2 commits into from
May 15, 2024

Conversation

stefreak
Copy link
Member

@stefreak stefreak commented May 15, 2024

Use the V8 cache feature introduced in Node v22.1.0 to improve the CLI command startup time.

This feature is enabled by default, and GARDEN_COMPILE_CACHE=0 can be used if it causes a problem as escape hatch.

On my M2 mac it saves ~11-30ms when running garden --help; On CircleCI Windows runner it saves 2 seconds for each CLI command invocation, so the difference can be really significant.

This can speed up the core command startup time.

Can be enabled by now using `GARDEN_COMPILE_CACHE=1` and is disabled by
default.

On my M2 mac it saves ~11-30ms when running `garden --help`
vvagaytsev
vvagaytsev previously approved these changes May 15, 2024
Copy link
Collaborator

@vvagaytsev vvagaytsev left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@stefreak stefreak enabled auto-merge May 15, 2024 15:38
@stefreak stefreak disabled auto-merge May 15, 2024 15:39
@stefreak stefreak changed the title feat: experimental flag to enable v8 cache improvement: improve cli startup performance using v8 cache May 15, 2024
@stefreak stefreak requested a review from vvagaytsev May 15, 2024 15:57
@stefreak stefreak added this pull request to the merge queue May 15, 2024
Merged via the queue into main with commit 7d8034b May 15, 2024
40 checks passed
@stefreak stefreak deleted the feat/v8-cache branch May 15, 2024 23:03
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.

None yet

2 participants