aws-solutions / media-services-application-mapper

Media Services Application Mapper is a browser-based tool that allows operators to visualize the structure and logical connections among AWS Media Services and supporting services in the cloud. The tool can be used as a top-down resource monitoring tool when integrated with CloudWatch.
Apache License 2.0
84 stars 27 forks source link

Slow performing /cloudwatch/alarms/all/{region} #143

Closed JimTharioAmazon closed 4 years ago

JimTharioAmazon commented 4 years ago

User with over 500 alarms in a single region is getting a timeout from the above mentioned API. This API call is used to populate the subscribe-to-alarms dialog. We need to implement paging into this. We also use a tabulator control here, so if a custom API can be created to leverage its built-in paging support, that would be great.

JimTharioAmazon commented 4 years ago

Today I found an expensive filter function that was processing each alarm record before returning the payload the browser. This function was adding about 200-300% more time to the REST API call. Rewriting the filtering function has reduced that time significantly.

JimTharioAmazon commented 4 years ago

With this change, I am able to load 1025 alarms from us-west-2 in about 10s.

image