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.
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.