microsoft/azure-pipelines-extensions

Forced verbose logging causes increased runtime

bjowes opened this issue · 0 comments

We are using the task IISWebAppMgmt@3 to deploy our web apps to IIS. The runtime of this task is rather long (about 40 seconds, occasionally much longer) given the actions it actually performs.

When investigating runtime for our other tasks I found that the amount of logging from Remote PowerShell execution has a significant impact on runtime. We had one task where the runtime was reduced from 40 seconds to 9 seconds simply by disabling verbose logging. After this find I looked into if I could somehow disable verbose logging for the IISWebAppMgmt@3 task. However, it seems that verbose logging is hard coded into a utility method used by the task, from this specific line:

Given how it is coded, I don't think it is possible to disable the verbose logging. Please add this possibility!
In my view a better default would be to not output verbose logging, but instead provide a possibility to enable it. Verbose logging could for instance be controlled by:

  • a new parameter to the task
  • the "System.Debug" environment variable
  • some other environment variable
    If it is decided to keep it enabled by default, it would still be a great improvement if a possibility to disable it was added.

I have not investigated how many tasks are affected by this, but I assume that IISWebAppMgmt@3 is just one of many that use the relevant script for remote PowerShell execution. Hence, fixing this has a great potential in improving deployment runtime for a huge amount of Azure DevOps users.

If the above makes sense, I would be happy to provide a PR to implement it.