Improve performance of alarm endpoint