Skip to content

perf: don't fetch all the hosts #18319 followup#19021

Merged
ThyMinimalDev merged 7 commits intomainfrom
dont-fetch-all-hosts-followup
Jan 31, 2025
Merged

perf: don't fetch all the hosts #18319 followup#19021
ThyMinimalDev merged 7 commits intomainfrom
dont-fetch-all-hosts-followup

Conversation

@ibex088
Copy link
Copy Markdown
Contributor

@ibex088 ibex088 commented Jan 31, 2025

What does this PR do?

https://www.loom.com/share/d4823e6d722d44fc86b7150297580b0a

  • Fixes #XXXX (GitHub issue number)
  • Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

@graphite-app graphite-app Bot requested a review from a team January 31, 2025 03:48
@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 31, 2025

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

Name Status Preview Comments Updated (UTC)
cal-com-ui-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2025 9:48am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Jan 31, 2025 9:48am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Jan 31, 2025 9:48am

@keithwillcode keithwillcode added core area: core, team members only platform Anything related to our platform plan labels Jan 31, 2025
@graphite-app graphite-app Bot requested a review from a team January 31, 2025 03:48
@dosubot dosubot Bot added the performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive label Jan 31, 2025
@ibex088 ibex088 removed the request for review from a team January 31, 2025 03:49
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Jan 31, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (01/31/25)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add platform team as reviewer" took an action on this PR • (01/31/25)

1 reviewer was added to this PR based on Keith Williams's automation.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 31, 2025

E2E results are ready!

Copy link
Copy Markdown
Contributor

@Udit-takkar Udit-takkar left a comment

Choose a reason for hiding this comment

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

FYI My original PR was just for the public get event type function.
So only @get("/:username/:eventSlug/public") has to be updated

data:
data && data.length > 0
? transformApiEventTypeForAtom(data[0], props.entity, props.defaultFormValues)
? transformApiEventTypeForAtom(data[0], props.entity, props.defaultFormValues, true)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

transformApiEventTypeForAtom is always call with limitHostsToThree, shouldn't limitHostsToThree be controlled by a prop given to the booker platform wrapper ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@ibex088
Copy link
Copy Markdown
Contributor Author

ibex088 commented Jan 31, 2025

FYI My original PR was just for the public get event type function. So only @get("/:username/:eventSlug/public") has to be updated

Hi @Udit-takkar the changes you made in the component -- using subsetOfUsers and subSetOfHosts instead of user and hosts broke our booker atom, so we are just adding these to the API's the the booker-atom calls.
unfortunately we don't use @get("/:username/:eventSlug/public") in the booker atom

Copy link
Copy Markdown
Contributor

@supalarry supalarry left a comment

Choose a reason for hiding this comment

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

Great job ! : ) Have just tiny comment below.

Comment thread packages/platform/atoms/booker/BookerPlatformWrapper.tsx Outdated
@supalarry supalarry self-requested a review January 31, 2025 09:42
@ThyMinimalDev ThyMinimalDev merged commit 56cd9ce into main Jan 31, 2025
@ThyMinimalDev ThyMinimalDev deleted the dont-fetch-all-hosts-followup branch January 31, 2025 10:19
MuhammadAimanSulaiman pushed a commit to hit-pay/cal.com that referenced this pull request Feb 25, 2025
* perf: don't fetch all the hosts calcom#18319 followup

* undo for user events

* undo for regular user events

* fix: limitHostsToThree -> hostsLimit

* accepting hostLimit prop in <Booker />

* Update booking.tsx

* hostLimit -> hostsLimit
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 performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive platform Anything related to our platform plan ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants