vmware-archive / webcommander

Powerful, flexible, intuitive and most importantly simple. That is what a real automation solution should be. No matter how complicated the task is, we'd like to turn it into a single click. Is that possible? Not without webcommander :)
MIT License
165 stars 47 forks source link

Length of time to run the script #207

Closed bvi1998 closed 5 years ago

bvi1998 commented 5 years ago

Hi, When I run my script from Webcommander locally it runs in 3 seconds. When it run it with Webcommander it takes 39 seconds. I just going out and getting free IP addresses from an IPAM server, then registering the server in DNS. I am using the option $runFromWeb = $true, so the script is quite simple. Has anyone experienced this? I am using two CIM sessions, one to the IPAM server and one to the DC. Thanks!

9whirls commented 5 years ago
. .\objects.ps1
$start = get-date
start-sleep 10
$end = get-date
$duration = ($end - $start).totalseconds
writeCustomizedMsg "Info - execution time $duration seconds "

Please try this script from webcommander and see how much time it takes.

bvi1998 commented 5 years ago

thanks it took 146 seconds

9whirls commented 5 years ago

That means the real execution time is constantly 13 to 15 times of the expected execution time. And the problem is not in the script.

If this is caused by web commander, we should have observed it long ago. So I am pretty sure this is a server specific issue. I mean it only happens on your machine. I couldn't do further investigation without access to your server.

bvi1998 commented 5 years ago

ok thanks!