indico / indico-checkin-pwa

MIT License
2 stars 5 forks source link

Speed up bulkUpdate #60

Closed tomasr8 closed 3 months ago

tomasr8 commented 3 months ago

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.

github-actions[bot] commented 3 months ago

📝 Lighthouse report