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

perf: vercel lambdas, drop unrequired deps #3581

Merged
merged 6 commits into from
Mar 30, 2023

Conversation

belgattitude
Copy link
Owner

@belgattitude belgattitude commented Mar 30, 2023

Context: vercel/next.js#42641 and vercel/next.js#42641 (comment)

In this repo example with yarn and supportedArchitectures (#3582) there's no value to play with the experimental.outputFileTracingExcludes: vercel/next.js#44605.

But as I use PNPM often, I feel nice to keep the code commented.

That said it would be super nice to have an equivalent to yarn supportedArchitectures for all package managers: ie: npm npm/rfcs#519

Before



Traced Next.js server files in: 1.197s
--
12:16:39.934 | Serverless function size info
12:16:39.935 | Serverless Function's pages: _monitor/sentry/ssr-page.js, 404.js, admin.js, auth/login.js, home.js, index.js
12:16:39.940 | Large Dependencies           Uncompressed size  Compressed size
12:16:39.940 | node_modules/next/dist                 8.39 MB          2.23 MB
12:16:39.941 | node_modules/react-dom/cjs             1.64 MB        404.02 KB
12:16:39.941 | node_modules/@sentry/nextjs            1.28 MB        310.02 KB
12:16:39.941 | node_modules/@mui/base               525.18 KB        155.47 KB
12:16:39.941 | apps/nextjs-app/.next                435.02 KB        123.02 KB
12:16:39.941 |  
12:16:39.941 | All dependencies                       16.4 MB          4.43 MB
12:16:39.941 | Serverless Function's pages: api/_monitor/healthcheck.js, api/_monitor/sentry.js, api/auth/[...nextauth].js, api/gateway/graphql.js, api/graphql.js, api/hello.js, api/rest/poem.js, api/rest/post.js, api/rest/post/[id].js
12:16:39.949 | Large Dependencies           Uncompressed size  Compressed size
12:16:39.949 | node_modules/.prisma/client           16.22 MB          7.22 MB
12:16:39.949 | node_modules/next/dist                 8.19 MB          2.18 MB
12:16:39.949 | node_modules/react-dom/cjs             1.64 MB        404.02 KB
12:16:39.949 | node_modules/@sentry/nextjs            1.28 MB        310.02 KB
12:16:39.949 |  
12:16:39.949 | All dependencies                      38.52 MB         13.04 MB
12:16:39.954 | Created all serverless functions in: 4.964s
12:16:40.006 | Collected static files (public/, static/, .next/static): 8.146ms
12:16:41.528 | Build Completed in /vercel/output [3m]
12:16:51.002 | Generated build outputs:
12:16:51.003 | - Static files: 87
12:16:51.003 | - Prerenders: 16
12:16:51.003 | - Serverless Functions: 13
12:16:51.003 | - Edge Functions: 1
12:16:51.003 | Serverless regions: Frankfurt, Germany
12:16:51.003 | Deployed outputs in 4s
12:16:51.337 | Build completed
12:17:14.452 | Uploading build cache [178.89 MB]...
12:17:18.714 | Build cache uploaded: 4.261s

After



Traced Next.js server files in: 1.198s
--
13:12:19.146 | Serverless function size info
13:12:19.147 | Serverless Function's pages: _monitor/sentry/ssr-page.js, 404.js, admin.js, auth/login.js, home.js, index.js
13:12:19.152 | Large Dependencies          Uncompressed size  Compressed size
13:12:19.152 | node_modules/next/dist                8.39 MB          2.23 MB
13:12:19.153 | node_modules/react-dom/cjs            1.64 MB        404.02 KB
13:12:19.153 | node_modules/rollup/dist            1010.3 KB         217.1 KB
13:12:19.153 | node_modules/@mui/base              525.18 KB        155.47 KB
13:12:19.153 | apps/nextjs-app/.next               435.02 KB        123.02 KB
13:12:19.153 |  
13:12:19.153 | All dependencies                      16.4 MB          4.43 MB
13:12:19.153 | Serverless Function's pages: api/_monitor/healthcheck.js, api/_monitor/sentry.js, api/auth/[...nextauth].js, api/gateway/graphql.js, api/graphql.js, api/hello.js, api/rest/poem.js, api/rest/post.js, api/rest/post/[id].js
13:12:19.161 | Large Dependencies           Uncompressed size  Compressed size
13:12:19.161 | node_modules/.prisma/client           16.22 MB          7.22 MB
13:12:19.161 | node_modules/next/dist                 8.19 MB          2.18 MB
13:12:19.161 | node_modules/react-dom/cjs             1.64 MB        404.02 KB
13:12:19.161 | node_modules/rollup/dist             1010.3 KB         217.1 KB
13:12:19.162 |  
13:12:19.162 | All dependencies                      38.52 MB         13.04 MB
13:12:19.167 | Created all serverless functions in: 5.043s
13:12:19.222 | Collected static files (public/, static/, .next/static): 9.652ms
13:12:20.768 | Build Completed in /vercel/output [2m]
13:12:30.421 | Generated build outputs:
13:12:30.422 | - Static files: 87
13:12:30.422 | - Prerenders: 16
13:12:30.422 | - Serverless Functions: 13
13:12:30.422 | - Edge Functions: 1
13:12:30.422 | Serverless regions: Frankfurt, Germany
13:12:30.422 | Deployed outputs in 5s
13:12:30.753 | Build completed
13:12:52.576 | Uploading build cache [167.69 MB]...
13:12:56.704 | Build cache uploaded: 4.127s


@changeset-bot
Copy link

changeset-bot bot commented Mar 30, 2023

⚠️ No Changeset found

Latest commit: 4b6670c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link

vercel bot commented Mar 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
monorepo-nextjs-app ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 30, 2023 at 0:21AM (UTC)
monorepo-vite-app ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 30, 2023 at 0:21AM (UTC)

@codeclimate
Copy link

codeclimate bot commented Mar 30, 2023

Code Climate has analyzed commit 4b6670c and detected 0 issues on this pull request.

View more on Code Climate.

@ghost
Copy link

ghost commented Mar 30, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

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.

1 participant