cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

[CAL-4490] Improvement: Use routedTeamMemberIds and contactOwner for performance improvement in loading members data

Open hariombalhara opened this issue 1 year ago • 2 comments

routedTeamMemberIds should be used to load just those members from DB. This could reduce DB Query time when an event has a lot of assigned members but only a few of them are used.

CAL-4490

hariombalhara avatar Oct 10 '24 03:10 hariombalhara

Hi! I’ve been looking into the issue and here’s what I understand so far:

Current Problem: Right now, the system is loading all team members from the database when handling an event, even though only a few are actually needed. This is causing unnecessary load and slowing things down, especially for large teams.

Proposed Solution: • I’m thinking of creating something called routedTeamMemberIds to only load the members that are actually relevant for the event. Relevancy would be based on criteria like accepted membership, specific roles (e.g., admins, owners), and members tied directly to the event. • I’ll update the database query to fetch just those specific members, instead of pulling in everyone. • This should help improve the performance by reducing the amount of data being fetched. Does this approach make sense? I’d love to hear your thoughts or any feedback you might have on this direction!

vaiishnavii avatar Oct 18 '24 02:10 vaiishnavii

Heyy @hariombalhara @vaiishnavii what's the update ? Should we all crack this together ?

giteshsarvaiya avatar Dec 07 '24 19:12 giteshsarvaiya