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

Speed up bulkUpdate #60

Merged
merged 1 commit into from
Jul 19, 2024
Merged

Speed up bulkUpdate #60

merged 1 commit into from
Jul 19, 2024

Conversation

tomasr8
Copy link
Member

@tomasr8 tomasr8 commented Jul 18, 2024

Previously we were calling bulkUpdate on all participants regardless of whether the fetched participants were different from the ones stored in IndexedDB. Since the participant data changes infrequently, we were wasting a lot of CPU cycles on updating identical records.

We now filter out only those participants that are actually different and only bulkUpdate those.

For 10k participants, this leads to ~6x speedup.

Previously we were calling bulkUpdate on all participants
regardless of whether the fetched participants were actually
different from the ones stored in IndexedDB.

Since the participant data changes infrequently, we were
wasting a lot of CPU cycles on updating identical records.

We now filter out using deep equality only those participants
that are actually different and only bulkUpdate those.

For 10k participants, this leads to ~6x speedup.
Copy link

📝 Lighthouse report

@tomasr8 tomasr8 merged commit fe071e4 into indico:master Jul 19, 2024
1 check passed
@tomasr8 tomasr8 deleted the faster-bulk-update branch July 19, 2024 09:21
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