Path-Check / safeplaces-dct-app

COVID Safe Paths (based on Private Kit) is an open and privacy preserving system to use personal information to battle COVID
https://covidsafepaths.org
MIT License
466 stars 283 forks source link

HA Selection Intersect Trigger Only On Change #1298

Closed JacobJaffe closed 4 years ago

JacobJaffe commented 4 years ago

The middleware for HA Selection has been triggering excessively, due to

  1. a shallow comparison check on array equality, vs. a check on the sameness of the array HAs by ids
  2. the persist middlelware triggering an intersection on app start always, due to the persist rehydrate action instantiating the store

This improves app launch performance & the toggle performance around toggling HAs. May fix https://pathcheck.atlassian.net/browse/SAF-817, will check that seperately