In the recurring service, we try to match an existing contact address for each trip start/end place.
When there are a lot of trips to process, this can result in many database IO and tend to make many conflicts since the few same contacts tend to be updated (e.g. myself).
So instead of updating each contact for each trip, we postpone the actual db save after all the trips are processed, and deduplicate the contacts update. For example, if the myself contact has an address with 100 match, we save it once instead of 100 times.
### ✨ Features
*
### 🐛 Bug Fixes
* Minimize conflicts on recurring service
* Minimize risks of recurring service timeout
### 🔧 Tech
*
In the recurring service, we try to match an existing contact address for each trip start/end place. When there are a lot of trips to process, this can result in many database IO and tend to make many conflicts since the few same contacts tend to be updated (e.g. myself). So instead of updating each contact for each trip, we postpone the actual db save after all the trips are processed, and deduplicate the contacts update. For example, if the myself contact has an address with 100 match, we save it once instead of 100 times.