crowd.dev
crowd.dev copied to clipboard
Optimize aggregate recalculation triggers
Currently, we recalculate aggregates whenever a member, organization, or activity changes, but we should only do so when:
- an activity is created
- activity type, platform, channel, timestamp, memberId, segmentId or organizationId is updated
- member affiliations are changed
Everything else should not trigger aggregate recalculations, as it would be a waste of resources. For example, changes to an activity’s body, a member’s attributes, or an organization’s URL do not impact aggregates.