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

Techdebt/bundle size experiments #7894

Merged
merged 5 commits into from
Mar 23, 2023
Merged

Conversation

emrysal
Copy link
Contributor

@emrysal emrysal commented Mar 23, 2023

What does this PR do?

  • Removed locales from @calcom/dayjs (~2.3% package size reduce)

  • Lodash does not tree shake correctly when you do import { debounce } from "lodash" - but it does when (which we did inconsistently throughout) using import merge from "lodash/merge". This is where dynamicImports shines, so we now (will) have the best of both worlds.

    Results in a meaningful ~ -7% drop in the size of affected page entries.

  • /settings/my-account/profile included crypto into the client side. Removing this reduced this entry 35%.

@vercel
Copy link

vercel bot commented Mar 23, 2023

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

Name Status Preview Comments Updated
cal ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 23, 2023 at 3:57AM (UTC)
ui ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 23, 2023 at 3:57AM (UTC)

@github-actions
Copy link
Contributor

github-actions bot commented Mar 23, 2023

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 210.88 KB (-19 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Seventy Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/404 8.37 KB 219.25 KB 62.64% (+/- <0.01%)
/[user] 103.22 KB 314.1 KB 89.74% (🟢 -2.31%)
/[user]/[type] 91.71 KB 302.59 KB 86.46% (🟢 -2.32%)
/[user]/[type]/embed 91.74 KB 302.62 KB 86.46% (🟢 -2.31%)
/[user]/book 183.13 KB 394.01 KB 112.57% (🟢 -2.31%)
/[user]/embed 103.29 KB 314.17 KB 89.76% (🟢 -2.32%)
/apps 163.21 KB 374.09 KB 106.88% (🟢 -2.31%)
/apps/[slug] 186.93 KB 397.81 KB 113.66% (🟢 -2.31%)
/apps/[slug]/[...pages] 388.54 KB 599.42 KB 171.26% (🟢 -2.31%)
/apps/categories 148.11 KB 358.99 KB 102.57% (🟢 -2.32%)
/apps/categories/[category] 151.97 KB 362.85 KB 103.67% (🟢 -2.31%)
/apps/installed/[category] 193.13 KB 404.01 KB 115.43% (🟢 -2.31%)
/auth/error 19.24 KB 230.12 KB 65.75% (+/- <0.01%)
/auth/forgot-password 25.58 KB 236.46 KB 67.56% (+/- <0.01%)
/auth/forgot-password/[id] 32.78 KB 243.66 KB 69.62% (🟢 -2.32%)
/auth/login 40.05 KB 250.94 KB 71.70% (+/- <0.01%)
/auth/logout 7.56 KB 218.44 KB 62.41% (+/- <0.01%)
/auth/setup 79.3 KB 290.18 KB 82.91% (🟢 -6.91%)
/availability 151.32 KB 362.2 KB 103.49% (🟢 -2.32%)
/availability/[schedule] 268.03 KB 478.91 KB 136.83% (🟢 -2.34%)
/availability/troubleshoot 148.79 KB 359.68 KB 102.76% (🟢 -2.31%)
/booking/[uid] 123.32 KB 334.2 KB 95.49% (🟢 -2.32%)
/bookings/[status] 269.22 KB 480.1 KB 137.17% (🟡 +0.04%)
/d/[link]/[slug] 91.36 KB 302.24 KB 86.35% (🟢 -2.31%)
/d/[link]/[slug]/embed 91.39 KB 302.27 KB 86.36% (🟢 -2.31%)
/d/[link]/book 182.78 KB 393.66 KB 112.47% (🟢 -2.32%)
/event-types 345.92 KB 556.8 KB 159.09% (🟢 -2.32%)
/event-types/[type] 378.63 KB 589.52 KB 168.43% (🟢 -2.31%)
/getting-started/[[...step]] 303.7 KB 514.58 KB 147.02% (🟢 -8.71%)
/more 147.73 KB 358.61 KB 102.46% (🟢 -2.31%)
/payment/[uid] 60.63 KB 271.51 KB 77.57% (🟢 -2.31%)
/settings/admin 153.17 KB 364.05 KB 104.02% (🟢 -2.32%)
/settings/admin/apps 161.89 KB 372.77 KB 106.51% (🟢 -9.23%)
/settings/admin/apps/[category] 161.87 KB 372.75 KB 106.50% (🟢 -9.23%)
/settings/admin/impersonation 153.46 KB 364.34 KB 104.10% (🟢 -2.32%)
/settings/billing 153.29 KB 364.17 KB 104.05% (🟢 -2.32%)
/settings/developer/api-keys 182.44 KB 393.32 KB 112.38% (🟢 -2.32%)
/settings/developer/webhooks 155.78 KB 366.66 KB 104.76% (🟢 -2.32%)
/settings/developer/webhooks/[id] 186.63 KB 397.51 KB 113.57% (🟢 -2.31%)
/settings/developer/webhooks/new 186.49 KB 397.37 KB 113.53% (🟢 -2.31%)
/settings/my-account/appearance 167.25 KB 378.13 KB 108.04% (🟢 -2.32%)
/settings/my-account/calendars 187.48 KB 398.36 KB 113.82% (🟢 -2.32%)
/settings/my-account/conferencing 159.05 KB 369.93 KB 105.69% (🟢 -2.31%)
/settings/my-account/general 262.35 KB 473.23 KB 135.21% (🟢 -2.32%)
/settings/my-account/profile 270.92 KB 481.8 KB 137.66% (🟢 -45.20%)
/settings/security/impersonation 155.33 KB 366.21 KB 104.63% (🟢 -2.32%)
/settings/security/password 188.62 KB 399.5 KB 114.14% (🟢 -2.31%)
/settings/security/sso 163.02 KB 373.9 KB 106.83% (🟢 -2.32%)
/settings/security/two-factor-auth 157.78 KB 368.66 KB 105.33% (🟢 -2.31%)
/settings/teams 152.92 KB 363.8 KB 103.94% (🟢 -2.31%)
/settings/teams/[id]/appearance 167.27 KB 378.15 KB 108.04% (🟢 -2.31%)
/settings/teams/[id]/billing 153.15 KB 364.03 KB 104.01% (🟢 -2.32%)
/settings/teams/[id]/members 293.81 KB 504.69 KB 144.20% (🟢 -2.32%)
/settings/teams/[id]/onboard-members 49.94 KB 260.82 KB 74.52% (🟢 -6.91%)
/settings/teams/[id]/profile 265.56 KB 476.44 KB 136.13% (🟢 -2.32%)
/settings/teams/[id]/sso 163.11 KB 373.99 KB 106.85% (🟢 -2.31%)
/settings/teams/new 89.2 KB 300.08 KB 85.74% (🟢 -6.92%)
/signup 25.45 KB 236.33 KB 67.52% (+/- <0.01%)
/team/[slug] 105.77 KB 316.65 KB 90.47% (🟢 -2.32%)
/team/[slug]/[type] 91.36 KB 302.25 KB 86.36% (🟢 -2.32%)
/team/[slug]/[type]/embed 91.39 KB 302.28 KB 86.36% (🟢 -2.31%)
/team/[slug]/book 182.78 KB 393.66 KB 112.47% (🟢 -2.31%)
/team/[slug]/embed 105.83 KB 316.71 KB 90.49% (🟢 -2.32%)
/teams 147.96 KB 358.84 KB 102.52% (🟢 -2.31%)
/video/[uid] 76.71 KB 287.59 KB 82.17% (🟢 -2.32%)
/video/meeting-ended/[uid] 14.67 KB 225.55 KB 64.44% (🟢 -2.31%)
/video/meeting-not-started/[uid] 14.3 KB 225.18 KB 64.34% (🟢 -2.32%)
/video/no-meeting-found 6.6 KB 217.48 KB 62.14% (+/- <0.01%)
/workflows 160.85 KB 371.73 KB 106.21% (🟢 -2.32%)
/workflows/[workflow] 290.67 KB 501.55 KB 143.30% (🟢 -2.32%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@deploysentinel
Copy link

deploysentinel bot commented Mar 23, 2023

Current Playwright Test Results Summary

✅ 66 Passing - ⚠️ 1 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 03/23/2023 04:08:48am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: abbab61

Started: 03/23/2023 04:02:46am UTC

⚠️ Flakes

📄   packages/app-store/routing-forms/playwright/tests/basic.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Routing Forms Seeded Routing Form Routing Link - Reporting and CSV Download
Retry 1Initial Attempt
2.84% (5) 5 / 176 runs
failed over last 7 days
24.43% (43) 43 / 176 runs
flaked over last 7 days

View Detailed Build Results


@@ -54,8 +54,8 @@ export const getConnectedCalendars = async (
};
}
const cals = await calendar.listCalendars();
const calendars = _(cals)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one was a bad one, but serverside only 🤔

Copy link
Member

@zomars zomars left a comment

Choose a reason for hiding this comment

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

Noice

@zomars zomars merged commit 46f0b55 into main Mar 23, 2023
@zomars zomars deleted the techdebt/bundle-size-experiments branch March 23, 2023 18:49
@PeerRich PeerRich added the core area: core, team members only label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants