Skip to content

[cli] add compile cache to improve startup performance#12783

Merged
styfle merged 5 commits intomainfrom
styfle/compile-cache
Jan 10, 2025
Merged

[cli] add compile cache to improve startup performance#12783
styfle merged 5 commits intomainfrom
styfle/compile-cache

Conversation

@styfle
Copy link
Copy Markdown
Member

@styfle styfle commented Dec 19, 2024

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Dec 19, 2024

🦋 Changeset detected

Latest commit: d867f88

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vercel Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

@EndangeredMassa EndangeredMassa left a comment

Choose a reason for hiding this comment

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

The 5ms gain doesn't seem worth the work, but now that that work is done, I'm fine merging it in.

@styfle styfle added this pull request to the merge queue Jan 10, 2025
Merged via the queue into main with commit 9aa2db7 Jan 10, 2025
@styfle styfle deleted the styfle/compile-cache branch January 10, 2025 19:07
@styfle
Copy link
Copy Markdown
Member Author

styfle commented Jan 10, 2025

I just benchmarked it again running 4 times each and the difference is like 300ms on the first run and then around 60ms.

Before

▲ time ./packages/cli/dist/index.js --version
0.23s user 0.09s system 49% cpu 0.646 total
▲ time ./packages/cli/dist/index.js --version
0.18s user 0.03s system 100% cpu 0.209 total
▲ time ./packages/cli/dist/index.js --version
0.18s user 0.02s system 102% cpu 0.195 total
▲ time ./packages/cli/dist/index.js --version
0.18s user 0.02s system 102% cpu 0.197 total

After

▲ time ./packages/cli/dist/vc.js --version   
0.17s user 0.06s system 65% cpu 0.353 total
▲ time ./packages/cli/dist/vc.js --version   
0.12s user 0.03s system 100% cpu 0.148 total
▲ time ./packages/cli/dist/vc.js --version
0.12s user 0.02s system 103% cpu 0.135 total
▲ time ./packages/cli/dist/vc.js --version
0.12s user 0.02s system 102% cpu 0.136 total

EndangeredMassa pushed a commit that referenced this pull request Jan 13, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## [email protected]

### Minor Changes

- [cli] add compile cache to improve startup performance
([#12783](#12783))

### Patch Changes

- [cli] standardizes uses of confirm on confirm.ts
([#12834](#12834))

- [cli] sort imports in build/index.ts
([#12833](#12833))

- Updated dependencies
\[[`5fea2c49103adf6f7153f04378bff6f571375b0e`](5fea2c4)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Minor Changes

- Add support for in-function concurrency
([#12850](#12850))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
TooTallNate added a commit that referenced this pull request Jan 15, 2025
Local development of CLI (via `npm link`) was broken after #12783 due to
the `src/vc.js` script not having the executable permission bit set.
github-merge-queue bot pushed a commit that referenced this pull request Jan 15, 2025
Local development of CLI (via `npm link`) was broken after #12783 due to
the `src/vc.js` script not having the executable permission bit set.
QuietCraftsmanship pushed a commit to QuietCraftsmanship/Vercel that referenced this pull request Jul 6, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## [email protected]

### Minor Changes

- [cli] add compile cache to improve startup performance
([#12783](vercel/vercel#12783))

### Patch Changes

- [cli] standardizes uses of confirm on confirm.ts
([#12834](vercel/vercel#12834))

- [cli] sort imports in build/index.ts
([#12833](vercel/vercel#12833))

- Updated dependencies
\[[`ac7961adcbbcf65b9cc6231b581e1f04a78bba2a`](vercel/vercel@ac7961a)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Minor Changes

- Add support for in-function concurrency
([#12850](vercel/vercel#12850))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

3 participants