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

fix: Improved recurring event booking speed #9600

Merged

Conversation

JaideepGuntupalli
Copy link
Contributor

@JaideepGuntupalli JaideepGuntupalli commented Jun 17, 2023

What does this PR do?

This pull request aims to improve the recurring booking speed by optimizing two crucial actions. The time required to perform the first action is directly proportional to the number of recurrences booked.

In the existing code, when 12 recurrences were booked, the first action took approximately 16 seconds.

However, with the changes implemented in this pull request, the same 12 recurrences can be processed in just 9 seconds.

This improvement is achieved by reducing the number of network requests from n to 1. Previously, the frontend code utilized a for loop, increasing network overhead. By streamlining the process, we significantly decrease network requests and payload size, enhancing the booking speed.

Although the network optimizations have been implemented, there is room for further improvement. One area that can be explored is reducing the number of exchanges from the database. It might be possible to create an optimized handler to enhance performance. Additionally, I couldn't find optimizations in the second action, which involves generating a booking success redirect. Further enhancements can be explored to make this action more efficient.

Fixes #9517

Type of change

  • Chore (refactoring code, technical debt, workflow improvements)

How should this be tested?

  • Try to book a recurring event locally from the main branch code
  • Try the same with the PR code

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

@vercel
Copy link

vercel bot commented Jun 17, 2023

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 11, 2023 4:43am
cal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 11, 2023 4:43am
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 11, 2023 4:43am

@vercel
Copy link

vercel bot commented Jun 17, 2023

@JaideepGuntupalli is attempting to deploy a commit to the cal-staging Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added Medium priority Created by Linear-GitHub Sync 🐛 bug Something isn't working labels Jun 17, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 17, 2023

📦 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! 🙌

@github-actions
Copy link
Contributor

github-actions bot commented Jun 19, 2023

Thank you for following the naming conventions! 🙏

@PeerRich PeerRich added the performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive label Jun 28, 2023
@JaideepGuntupalli
Copy link
Contributor Author

hey @emrysal, @hariombalhara, @zomars, just a reminder, can you pls review the PR

Copy link
Member

@hariombalhara hariombalhara left a comment

Choose a reason for hiding this comment

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

That's an amazing improvement. Thank you so much !!

Excited to ship it !!
excited

@hariombalhara hariombalhara merged commit e79b416 into calcom:main Jul 13, 2023
28 of 29 checks passed
fritterhoff pushed a commit to hm-edu/cal.com that referenced this pull request Jul 25, 2023
Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working Medium priority Created by Linear-GitHub Sync performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-1947] Booking a recurring event type is slow
4 participants