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

Optimise clash checking by querying at the sheet level #160

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

markspolakovs
Copy link
Member

Bit of a micro-optimisation: since by definition all crews on the same sheet have the same timings, either all of them have clashes or none of them do, so change the cache key to the sheet ID rather than the crew ID, and manually invalidate it upon signup/dropout.

@jenkins-ystv
Copy link

jenkins-ystv bot commented Sep 17, 2024

Deployed a preview of this PR to https://pr-160-internal.dev.ystv.co.uk

@markspolakovs
Copy link
Member Author

hm, still getting a request for each time I open the modal...
image

@archessmn
Copy link
Member

That's because the signupID is removed and then reset every time the modal is closed/opened, I'll have a look at it and push changes.

@archessmn
Copy link
Member

I was wrong, forgot how I did it, but this should stop it refreshing whenever it's mounted, and make sure it gets invalidated when the sheet gets updated.

@archessmn archessmn merged commit de2733d into main Sep 23, 2024
3 checks passed
@archessmn archessmn deleted the mp/optimise-clash-check-cache branch September 23, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants