liprec / vsts-release-aas

Repository for my Analysis Service Azure pipelines tasks related to Azure Analysis Service or Power BI Premium
Other
27 stars 28 forks source link

Increase total execution time since 1.5.0 #101

Closed interpeix closed 1 year ago

interpeix commented 2 years ago

Hi

We faced a significative increase time running TMSL scripts since 1.5.0 It seems that the most time consuming part is spent in fetching resources from Azure API and not in executing the script itself.

Here is an example: image

Four different TSML scripts with mostly the same amount of time, but the problem is that the 90% of the time occurs here:

`##[debug]Fetching Resources from https://management.azure.com//subscriptions/.......

[debug]GET https://management.azure.com//subscriptions/....... with 0-byte payload

[debug]received 8035-byte response of content type application/json; charset=utf-8

[debug]Fetching Resources from https://management.azure.com/subscriptions/.......

[debug]GET https://management.azure.com/subscriptions/.......

[debug]received 5573-byte response of content type application/json; charset=utf-8

[debug]Fetching Resources from https://management.azure.com/subscriptions/.......

[debug]GET https://management.azure.com/subscriptions/.......

[debug]received 4829-byte response of content type application/json; charset=utf-8

[debug]Fetching Resources from https://management.azure.com/subscriptions/.......

[debug]GET https://management.azure.com/subscriptions/.......

[debug]received 8475-byte response of content type application/json; charset=utf-8

[debug]Fetching Resources from https://management.azure.com/subscriptions/.......

[debug]GET https://management.azure.com/subscriptions/.......

[debug]received 19515-byte response of content type application/json; charset=utf-8

[debug]Fetching Resources from https://management.azure.com/subscriptions/.......

[debug]GET https://management.azure.com/subscriptions/.......

[debug]received 8969-byte response of content type application/json; charset=utf-8

[debug]Fetching Resources from https://management.azure.com/subscriptions/.......

[debug]GET https://management.azure.com/subscriptions/.......

[debug]received 6058-byte response of content type application/json; charset=utf-8

[debug]Fetching properties from https://management.azure.com//subscriptions/.......

[debug]GET https://management.azure.com//subscriptions/....

[debug]received 1696-byte response of content type application/json; charset=utf-8`

As i said that process takes a lot, and in some cases runs more than once per task. We think that could be related with the fact that the subscription have a "LOT OF" resources.

Any help to reduce that execution time would be appreciate, or any workaround to avoid that fetches from the Azure management api.

Regards

liprec commented 2 years ago

Thanks for the feedback and indeed it is probable due to the amount of resources in the provided resource group. The task is downloading all resources and queries the result for the given AAS and that can take some time with a lot of resources. I will look into the option to move the query part to the REST API for a next version.

interpeix commented 2 years ago

Thanks for the support

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

interpeix commented 1 year ago

Hi, any update on this?

liprec commented 1 year ago

The latest version (v1.5.11) contains a change that should solve this issue.