The update_alerts call in Aggregator can be costly. It loads the usages limits and the current usages to check whether an alert should be raised. This PR introduces a perf optimization. It adds a check to see if there can still be alerts raised for an app (there can only be one every 24h per alert level) before calculating all the usages.
The
update_alerts
call inAggregator
can be costly. It loads the usages limits and the current usages to check whether an alert should be raised. This PR introduces a perf optimization. It adds a check to see if there can still be alerts raised for an app (there can only be one every 24h per alert level) before calculating all the usages.