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

[CAL-119] Initial rendering of calendar takes 3-5 seconds! #4535

Closed
timfee opened this issue Sep 16, 2022 · 23 comments · Fixed by #6775
Closed

[CAL-119] Initial rendering of calendar takes 3-5 seconds! #4535

timfee opened this issue Sep 16, 2022 · 23 comments · Fixed by #6775
Assignees
Labels
💎 Bounty A bounty on Algora.io High priority Created by Linear-GitHub Sync 🧹 Improvements Improvements to existing features. Mostly UX/UI linear Sync Github Issue from community members to Linear.app 💰 Rewarded Rewarded bounties on Algora.io 🚧 wip / in the making This is currently being worked on
Milestone

Comments

@timfee
Copy link

timfee commented Sep 16, 2022

See image -- on a fast connection, with a single calendar configuration -- painfully slow.

Screenshot_2022-09-16_09-09-20_1o326Lzi

@PeerRich
Copy link
Member

can you post the link here?

@PeerRich PeerRich added this to the v.2.1 milestone Sep 19, 2022
@timfee
Copy link
Author

timfee commented Sep 19, 2022

https://cal.com/tim/15

@ciaranha ciaranha added the 🧹 Improvements Improvements to existing features. Mostly UX/UI label Sep 20, 2022
@baileypumfleet baileypumfleet modified the milestones: v.2.1, v.2.2 Oct 4, 2022
@ciaranha ciaranha added the linear Sync Github Issue from community members to Linear.app label Oct 13, 2022
@ciaranha ciaranha changed the title Initial rendering of calendar takes 3-5 seconds! [CAL-119] Initial rendering of calendar takes 3-5 seconds! Oct 13, 2022
@ciaranha
Copy link
Member

@ciaranha
Copy link
Member

Update from @emrysal

I think that's a bad ticket - it's been improving slowly ever since that was assigned to me but I'm not sure what is possible and it's continual improvement

@Tom-Potanski
Copy link

Tom-Potanski commented Jan 4, 2023

We also experience this issue. A lot. @Jaibles

@PeerRich PeerRich reopened this Jan 4, 2023
@PeerRich
Copy link
Member

PeerRich commented Jan 4, 2023

we have an ongoing task to improve performance of this. the main issue is that the cold boot of serverless functions is slow. this gets better if your app is used more frequenlty -- i know not a perfect solution. we're trying to find a way to do this without cold boot

@PeerRich PeerRich removed this from the v.2.2 milestone Jan 4, 2023
@PeerRich
Copy link
Member

PeerRich commented Jan 4, 2023

note to self: https://cal.com/peer/30min is faster, surprisingly

@PeerRich PeerRich added 💸 bounty High priority Created by Linear-GitHub Sync labels Jan 4, 2023
@leerob
Copy link

leerob commented Jan 4, 2023

What API is it using? What file? Random guess: https://github.com/calcom/cal.com/blob/main/apps/web/pages/api/book/event.ts

You might consider using Edge API Routes, which will help you get faster cold startups: https://nextjs.org/docs/api-routes/edge-api-routes

export const config = {
  runtime: 'edge',
}

export default async function handler(req: Request) {
  return new Response()
}

But I think would need to verify this is possible with next-auth.

@algora-io algora-io bot added the 💎 Bounty A bounty on Algora.io label Jan 4, 2023
@lukasklein
Copy link

note to self: https://cal.com/peer/30min is faster, surprisingly

the getSchedule request for your calendar takes almost 3s for me to complete as well

image

~ ❯ time curl 'https://cal.com/api/trpc/viewer.public.slots.getSchedule?batch=1&input=%7B%220%22%3A%7B%22json%22%3A%7B%22eventTypeId%22%3A127%2C%22eventTypeSlug%22%3A%2230min%22%2C%22usernameList%22%3A%5B%22peer%22%5D%2C%22startTime%22%3A%222023-01-02T23%3A00%3A00.000Z%22%2C%22endTime%22%3A%222023-01-31T22%3A59%3A59.999Z%22%2C%22timeZone%22%3A%22Europe%2FBerlin%22%2C%22duration%22%3Anull%7D%2C%22meta%22%3A%7B%22values%22%3A%7B%22duration%22%3A%5B%22undefined%22%5D%7D%7D%7D%7D' > /dev/null --compressed
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1394    0  1394    0     0    684      0 --:--:--  0:00:02 --:--:--   686
curl  --compressed > /dev/null  0.02s user 0.01s system 1% cpu 3.048 total

@leerob
Copy link

leerob commented Jan 5, 2023

Woah.

In this release, we have decreased the size of our engine files by an average of 50%. The size of the Query Engine used on Debian, with OpenSSL 3.0.x, for example, went from 39MB to 14MB. We will also remove some smaller engines to decrease the total size in future versions.

https://github.com/prisma/prisma/releases/tag/4.8.0

You might want to update! (Assuming this API route uses Prisma)

@PeerRich
Copy link
Member

PeerRich commented Jan 5, 2023

@lukasklein

the getSchedule request for your calendar takes almost 3s for me to complete as well

well 3 seconds is still better than 5 to 10 seconds (which we have seen too)

@PeerRich
Copy link
Member

PeerRich commented Jan 7, 2023

anyone interested in this, we're making a bit of progress. stay tuned.🙏

@PeerRich PeerRich pinned this issue Jan 7, 2023
@PeerRich
Copy link
Member

PeerRich commented Jan 9, 2023

we have identified that one of the slowness reasons is a slow caldav server for the affected users.

we can still improve prisma and cold boots tho

@PeerRich
Copy link
Member

PeerRich commented Jan 13, 2023

/bounty $1000 per second

@algora-pbc
Copy link

algora-pbc bot commented Jan 13, 2023

💎 $1,000.00 bounty created by PeerRich
👉 To claim this bounty, submit a pull request that includes the text /claim #4535 somewhere in its body
📝 To receive payouts, join Algora and complete the relevant onboarding steps
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🌳 If you want, you can donate 100% of the rewards to climate change projects!
🙏 Thank you for contributing to calcom/cal.com!

@PeerRich PeerRich added this to the 2.6 milestone Jan 26, 2023
@roae
Copy link
Contributor

roae commented Jan 28, 2023

@PeerRich I have an idea that could solve this, i will submit a pull request soon.

@algora-pbc
Copy link

algora-pbc bot commented Jan 29, 2023

💡 roae submitted a pull request that claims the bounty
👉 To accept and/or reward this claim, visit your org dashboard on Algora

@PeerRich PeerRich added the 🚧 wip / in the making This is currently being worked on label Feb 12, 2023
@ciaranha ciaranha modified the milestones: 2.6, v.2.8 Feb 18, 2023
@emrysal emrysal unpinned this issue Mar 2, 2023
@algora-pbc
Copy link

algora-pbc bot commented Mar 7, 2023

@roae cal wants to reward your solution. Please sign up on Algora, link your Github account and connect with Stripe on your dashboard.

@algora-pbc
Copy link

algora-pbc bot commented Mar 7, 2023

roae has completed their onboarding. You can now complete the payment on your org dashboard

@algora-pbc
Copy link

algora-pbc bot commented Mar 15, 2023

🎉🎈 @roae has been awarded $1,000! 🎈🎊

@algora-pbc algora-pbc bot added the 💰 Rewarded Rewarded bounties on Algora.io label Mar 15, 2023
@PeerRich
Copy link
Member

we ended up hiring @roae 🙏

@zomars
Copy link
Member

zomars commented Mar 16, 2023

https://cal.com/tim/15

@timfee we just released Data Proxy. Can you verify if it's still slow?

@timfee
Copy link
Author

timfee commented Mar 16, 2023

See attachment. Still seems like it's a bit slow, but better than before!

Upload.from.GitHub.for.iOS.MOV

@PeerRich PeerRich modified the milestones: v.2.8, 2.7 Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Bounty A bounty on Algora.io High priority Created by Linear-GitHub Sync 🧹 Improvements Improvements to existing features. Mostly UX/UI linear Sync Github Issue from community members to Linear.app 💰 Rewarded Rewarded bounties on Algora.io 🚧 wip / in the making This is currently being worked on
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

9 participants