send notifications outside of lock context
do a deep comparison to avoid updates when possible