Skip to content

perf: reduce number of api calls in event types#10381

Merged
emrysal merged 4 commits into
mainfrom
perf/event-types
Jul 28, 2023
Merged

perf: reduce number of api calls in event types#10381
emrysal merged 4 commits into
mainfrom
perf/event-types

Conversation

@Udit-takkar

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)

Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
@vercel

vercel Bot commented Jul 25, 2023

Copy link
Copy Markdown

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

Name Status Preview Comments Updated (UTC)
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 28, 2023 2:44pm
cal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 28, 2023 2:44pm
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 28, 2023 2:44pm
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 28, 2023 2:44pm
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Jul 28, 2023 2:44pm
qa ⬜️ Ignored (Inspect) Jul 28, 2023 2:44pm

@github-actions

github-actions Bot commented Jul 25, 2023

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@alwaysmeticulous

alwaysmeticulous Bot commented Jul 25, 2023

Copy link
Copy Markdown

🤖 Meticulous spotted visual differences in 49 of 213 screens tested: view and approve differences detected.

Last updated for commit b809c14. This comment will update as new commits are pushed.

@github-actions

github-actions Bot commented Jul 25, 2023

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@deploysentinel

deploysentinel Bot commented Jul 25, 2023

Copy link
Copy Markdown

Current Playwright Test Results Summary

✅ 106 Passing - ⚠️ 5 Flaky

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

(Last updated on 07/28/2023 02:38:43pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: b809c14

Started: 07/28/2023 02:36:39pm 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 Test preview should return correct route
Retry 1Initial Attempt
0% (0) 0 / 231 runs
failed over last 7 days
3.90% (9) 9 / 231 runs
flaked over last 7 days

📄   apps/web/playwright/event-types.e2e.ts • 2 Flakes

Top 1 Common Error Messages

null

2 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Event Types tests user enabling recurring event comes with default options
Retry 1Initial Attempt
0.34% (1) 1 / 290 run
failed over last 7 days
2.07% (6) 6 / 290 runs
flaked over last 7 days
Event Types tests user can add multiple organizer address
Retry 1Initial Attempt
0.70% (2) 2 / 286 runs
failed over last 7 days
14.34% (41) 41 / 286 runs
flaked over last 7 days

📄   apps/web/playwright/integrations-stripe.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Stripe integration Can book a paid booking
Retry 1Initial Attempt
3.51% (10) 10 / 285 runs
failed over last 7 days
3.86% (11) 11 / 285 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should be able to reschedule
Retry 1Initial Attempt
1.30% (3) 3 / 231 runs
failed over last 7 days
95.24% (220) 220 / 231 runs
flaked over last 7 days

View Detailed Build Results


Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
@Udit-takkar Udit-takkar marked this pull request as ready for review July 27, 2023 13:34
@keithwillcode keithwillcode requested a review from a team July 27, 2023 13:55
@keithwillcode keithwillcode added High priority Created by Linear-GitHub Sync performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive labels Jul 27, 2023
@keithwillcode keithwillcode added this to the v3.2 milestone Jul 27, 2023
const CTA = ({ data }: { data: GetByViewerResponse }) => {
const { t } = useLocale();

const query = trpc.viewer.eventTypes.getByViewer.useQuery();

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.

we were using this twice with different inputs

trpc.viewer.eventTypes.getByViewer.useQuery();

trpc.viewer.eventTypes.getByViewer.useQuery(filters && { filters });

PeerRich
PeerRich previously approved these changes Jul 28, 2023

@PeerRich PeerRich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

tested, feels faster already!

@emrysal emrysal merged commit 0f84102 into main Jul 28, 2023
@emrysal emrysal deleted the perf/event-types branch July 28, 2023 16:27
sean-brydon pushed a commit that referenced this pull request Jul 31, 2023
* perf: reduce number of api calls in event types

Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>

* chore

Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>

* perf: use staleTime and cacheTime

Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>

---------

Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>

@shivamklr shivamklr left a comment

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.

Tested, lgtm.

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 High priority Created by Linear-GitHub Sync performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

6 participants